Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-18 Thread Aya Mahfouz
On Fri, Oct 16, 2015 at 10:21:05PM -0700, Greg KH wrote:
> On Sat, Oct 17, 2015 at 12:07:28AM +0200, Aya Mahfouz wrote:
> > Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have
> > been replaced by is_power_of_2
> > 
> > Signed-off-by: Aya Mahfouz 
> > ---
> >  drivers/staging/lustre/include/linux/libcfs/libcfs.h | 7 ---
> >  1 file changed, 7 deletions(-)
> 
> You didn't test build this patch :(

I'm sorry I didn't run spatch on the header files too. I reran the
scripts on all lustre files including header and issued make clean and 
then make. Will be resending v2 soon. kbuild does apply all patches in
a patch set in order.

-- 
Kind Regards,
Aya Saif El-yazal Mahfouz
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-17 Thread Aya Mahfouz
On Fri, Oct 16, 2015 at 10:21:05PM -0700, Greg KH wrote:
> On Sat, Oct 17, 2015 at 12:07:28AM +0200, Aya Mahfouz wrote:
> > Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have
> > been replaced by is_power_of_2
> > 
> > Signed-off-by: Aya Mahfouz 
> > ---
> >  drivers/staging/lustre/include/linux/libcfs/libcfs.h | 7 ---
> >  1 file changed, 7 deletions(-)
> 
> You didn't test build this patch :(

I think I'm too old for this mistake. The way kbuild tests patch sets
will cause errors for sure. It tests every patch independently and of
course the removal of IS_PO2 will cause a problem if the previous
patches were not applied.

-- 
Kind Regards,
Aya Saif El-yazal Mahfouz
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-16 Thread Greg KH
On Sat, Oct 17, 2015 at 12:07:28AM +0200, Aya Mahfouz wrote:
> Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have
> been replaced by is_power_of_2
> 
> Signed-off-by: Aya Mahfouz 
> ---
>  drivers/staging/lustre/include/linux/libcfs/libcfs.h | 7 ---
>  1 file changed, 7 deletions(-)

You didn't test build this patch :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-16 Thread kbuild test robot
Hi Aya,

[auto build test ERROR on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Aya-Mahfouz/Remove-uses-and-definition-of-IS_PO2/20151017-060923
config: s390-allmodconfig (attached as .config)
reproduce:
wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=s390 

All errors (new ones prefixed by >>):

   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:111:0,
from drivers/staging/lustre/lnet/selftest/conrpc.c:43:
   drivers/staging/lustre/lnet/selftest/conrpc.c: In function 
'lstcon_rpc_cleanup_wait':
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:212:16:
>>  error: implicit declaration of function 'IS_PO2' 
>> [-Werror=implicit-function-declaration]
 static struct libcfs_debug_msg_data msgdata;   \
   ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
 note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
   drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
   drivers/staging/lustre/lnet/selftest/conrpc.c:1359:2: note: in expansion of 
macro 'lst_wait_until'
 lst_wait_until((atomic_read(&console_session.ses_rpc_counter) == 0),
 ^
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:111:0,
from drivers/staging/lustre/lnet/selftest/selftest.h:46,
from drivers/staging/lustre/lnet/selftest/framework.c:44:
   drivers/staging/lustre/lnet/selftest/framework.c: In function 'sfw_shutdown':
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:212:16:
>>  error: implicit declaration of function 'IS_PO2' 
>> [-Werror=implicit-function-declaration]
 static struct libcfs_debug_msg_data msgdata;   \
   ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
 note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
   drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
   drivers/staging/lustre/lnet/selftest/framework.c:1741:2: note: in expansion 
of macro 'lst_wait_until'
 lst_wait_until(sfw_data.fw_active_srpc == NULL, sfw_data.fw_lock,
 ^
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:111:0,
from drivers/staging/lustre/lnet/selftest/selftest.h:46,
from drivers/staging/lustre/lnet/selftest/timer.c:43:
   drivers/staging/lustre/lnet/selftest/timer.c: In function 'stt_shutdown':
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:212:16:
>>  error: implicit declaration of function 'IS_PO2' 
>> [-Werror=implicit-function-declaration]
 static struct libcfs_debug_msg_data msgdata;   \
   ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
 note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
   drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
   drivers/staging/lustre/lnet/selftest/timer.c:240:2: note: in expansion of 
macro 'lst_wait_until'
 lst_wait_until(stt_data.stt_nthreads == 0, stt_data.stt_lock,
 ^
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:111:0,
from drivers/staging/lustre/lnet/selftest/selftest.h:46,
from drivers/staging/lustre/lnet/selftest/rpc.c:47:
   drivers/staging/lustre/lnet/selftest/rpc.c: In function 
'srpc_service_add_buffers':
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:212:16:
>>  error: implicit declaration of function 'IS_PO2' 
>> [-Werror=implicit-function-declaration]
 static struct libcfs_debug_msg_data msgdata;   \
   ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
 note: in expansion of macro '__CDEBUG'
#def

Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-16 Thread kbuild test robot
Hi Aya,

[auto build test ERROR on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Aya-Mahfouz/Remove-uses-and-definition-of-IS_PO2/20151017-060923
config: i386-allyesconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/staging/lustre/lnet/selftest/conrpc.c: In function 
'lstcon_rpc_cleanup_wait':
>> drivers/staging/lustre/lnet/selftest/conrpc.c:1359:386: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors
--
   drivers/staging/lustre/lnet/selftest/framework.c: In function 'sfw_shutdown':
>> drivers/staging/lustre/lnet/selftest/framework.c:1741:386: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors
--
   drivers/staging/lustre/lnet/selftest/timer.c: In function 'stt_shutdown':
>> drivers/staging/lustre/lnet/selftest/timer.c:240:386: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors
--
   drivers/staging/lustre/lnet/selftest/rpc.c: In function 
'srpc_service_add_buffers':
>> drivers/staging/lustre/lnet/selftest/rpc.c:619:387: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
   cc1: some warnings being treated as errors

vim +/IS_PO2 +1359 drivers/staging/lustre/lnet/selftest/conrpc.c

d7e09d039 Peng Tao   2013-05-02  1353  
d7e09d039 Peng Tao   2013-05-02  1354   
mutex_lock(&console_session.ses_mutex);
d7e09d039 Peng Tao   2013-05-02  1355   }
d7e09d039 Peng Tao   2013-05-02  1356  
d7e09d039 Peng Tao   2013-05-02  1357   
spin_lock(&console_session.ses_rpc_lock);
d7e09d039 Peng Tao   2013-05-02  1358  
d7e09d039 Peng Tao   2013-05-02 @1359   
lst_wait_until((atomic_read(&console_session.ses_rpc_counter) == 0),
d7e09d039 Peng Tao   2013-05-02  1360  
console_session.ses_rpc_lock,
eac2e8c6f Rashika Kheria 2013-10-17  1361  "Network is not 
accessible or target is down, waiting for %d console RPCs to being recycled\n",
d7e09d039 Peng Tao   2013-05-02  1362  
atomic_read(&console_session.ses_rpc_counter));

:: The code at line 1359 was first introduced by commit
:: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system 
client support

:: TO: Peng Tao 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: Binary data
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-16 Thread kbuild test robot
Hi Aya,

[auto build test ERROR on staging/staging-next -- if it's inappropriate base, 
please suggest rules for selecting the more suitable base]

url:
https://github.com/0day-ci/linux/commits/Aya-Mahfouz/Remove-uses-and-definition-of-IS_PO2/20151017-060923
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:40:0,
from drivers/staging/lustre/lnet/selftest/conrpc.c:43:
   drivers/staging/lustre/lnet/selftest/conrpc.c: In function 
'lstcon_rpc_cleanup_wait':
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:10: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
 ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/linux/libcfs.h:109:25:
 note: in definition of macro '__CHECK_STACK'
  (msgdata)->msg_mask = mask;\
^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:214:2:
>>  note: in expansion of macro 'CFS_CHECK_STACK'
 CFS_CHECK_STACK(&msgdata, mask, cdls);\
 ^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
>>  note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
>> macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
>> drivers/staging/lustre/lnet/selftest/conrpc.c:1359:2: note: in expansion of 
>> macro 'lst_wait_until'
 lst_wait_until((atomic_read(&console_session.ses_rpc_counter) == 0),
 ^
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:40:0,
from drivers/staging/lustre/lnet/selftest/selftest.h:46,
from drivers/staging/lustre/lnet/selftest/framework.c:44:
   drivers/staging/lustre/lnet/selftest/framework.c: In function 'sfw_shutdown':
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:10: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
 ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/linux/libcfs.h:109:25:
 note: in definition of macro '__CHECK_STACK'
  (msgdata)->msg_mask = mask;\
^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:214:2:
>>  note: in expansion of macro 'CFS_CHECK_STACK'
 CFS_CHECK_STACK(&msgdata, mask, cdls);\
 ^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
>>  note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
>> macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
>> drivers/staging/lustre/lnet/selftest/framework.c:1741:2: note: in expansion 
>> of macro 'lst_wait_until'
 lst_wait_until(sfw_data.fw_active_srpc == NULL, sfw_data.fw_lock,
 ^
   cc1: some warnings being treated as errors
--
   In file included from 
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs.h:40:0,
from drivers/staging/lustre/lnet/selftest/selftest.h:46,
from drivers/staging/lustre/lnet/selftest/timer.c:43:
   drivers/staging/lustre/lnet/selftest/timer.c: In function 'stt_shutdown':
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:10: error: implicit 
>> declaration of function 'IS_PO2' [-Werror=implicit-function-declaration]
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
 ^
   
drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/linux/libcfs.h:109:25:
 note: in definition of macro '__CHECK_STACK'
  (msgdata)->msg_mask = mask;\
^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:214:2:
>>  note: in expansion of macro 'CFS_CHECK_STACK'
 CFS_CHECK_STACK(&msgdata, mask, cdls);\
 ^
>> drivers/staging/lustre/lnet/selftest/../../include/linux/libcfs/libcfs_debug.h:222:35:
>>  note: in expansion of macro '__CDEBUG'
#define CDEBUG(mask, format, ...) __CDEBUG(NULL, mask, format, ## 
__VA_ARGS__)
  ^
>> drivers/staging/lustre/lnet/selftest/selftest.h:588:3: note: in expansion of 
>> macro 'CDEBUG'
  CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,  \
  ^
>> drivers/staging/

[PATCH 4/4] staging: lustre: remove IS_PO2 and __is_po2

2015-10-16 Thread Aya Mahfouz
Removes IS_PO2 and __is_po2 since the uses of IS_PO2 have
been replaced by is_power_of_2

Signed-off-by: Aya Mahfouz 
---
 drivers/staging/lustre/include/linux/libcfs/libcfs.h | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 385ced1..c78a147 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -42,13 +42,6 @@
 
 #include "curproc.h"
 
-static inline int __is_po2(unsigned long long val)
-{
-   return !(val & (val - 1));
-}
-
-#define IS_PO2(val) __is_po2((unsigned long long)(val))
-
 #define LOWEST_BIT_SET(x)   ((x) & ~((x) - 1))
 
 /*
-- 
2.4.2


-- 
Kind Regards,
Aya Saif El-yazal Mahfouz
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel