Re: [PATCH v3 2/2] scripts: checkpatch: check unused parameters for function-like macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Can this patch please be dropped from Linux-next (currently via
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm#mm-everything)?
It is obviously wrong when dealing with named variadic macro
parameters:

 ./scripts/checkpatch.pl -f include/linux/rculist.h
ERROR: Parameter 'dummy' is not used in function-like macro, please
use static inline instead
#51: FILE: include/linux/rculist.h:51:
+#define __list_check_rcu(dummy, cond, extra...)
         \
+       ({                                                              \
+       check_arg_count_one(extra);                                     \
+       RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(),          \
+                        "RCU-list traversed in non-reader section!");  \
+       })

ERROR: Parameter 'extra...' is not used in function-like macro, please
use static inline instead
#51: FILE: include/linux/rculist.h:51:
+#define __list_check_rcu(dummy, cond, extra...)
         \
+       ({                                                              \
+       check_arg_count_one(extra);                                     \
+       RCU_LOCKDEP_WARN(!(cond) && !rcu_read_lock_any_held(),          \
+                        "RCU-list traversed in non-reader section!");  \
+       })

ERROR: Parameter 'dummy' is not used in function-like macro, please
use static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
         \
+       ({ check_arg_count_one(extra); })

ERROR: Parameter 'cond' is not used in function-like macro, please use
static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
         \
+       ({ check_arg_count_one(extra); })

ERROR: Parameter 'extra...' is not used in function-like macro, please
use static inline instead
#64: FILE: include/linux/rculist.h:64:
+#define __list_check_rcu(dummy, cond, extra...)
         \
+       ({ check_arg_count_one(extra); })




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux