rculist: Silence unused-value warning.
PATCH 1/1 rculist: Silence unused-value warning.
The macro __list_check_srcu is used as a statement inside a for loop.
__list_check_srcu becomes "true" when CONFIG_PROVE_RCU_LIST is not defined. This results in compiler warning about an unused value ("true").
Silence the compiler warning about the unused value "true" by replacing it with an empty expression.
--- include/linux/rculist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/rculist.h +1 -1
@@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list) #define __list_check_rcu(dummy, cond, extra...) \ ({ check_arg_count_one(extra); }) -#define __list_check_srcu (cond) true +#define __list_check_srcu (cond) ({})#endif /*
Signature · 1 line
2.17.1
Paul E. McKenney
maintainerQuoted 9 lines · Suraj Upadhyay
The macro
__list_check_srcuis used as a statement inside a for loop.
__list_check_srcubecomes "true" whenCONFIG_PROVE_RCU_LISTis not defined. This results in compiler warning about an unused value ("true").Silence the compiler warning about the unused value "true" by replacing it with an empty expression.
Signed-off-by Suraj Upadhyay <[email protected]>
Like this, you mean, give or take whitespace? ;-)
https://lore.kernel.org/lkml/20200718001259.GY9247@paulmck-ThinkPad-P72/
May I add your Tested-by?
Thanx, Paul
Quoted 20 lines
--- include/linux/rculist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/rculist.h +1
-1@@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list) #define __list_check_rcu(dummy, cond, extra...) \ ({ check_arg_count_one(extra); }) -#define __list_check_srcu (cond) true +#define __list_check_srcu (cond) ({})#endif /* Signature · 1 line
2.17.1
A message that is not in the archive (sent off-list or not yet received): CAGbbQbG5ZLRhc+nxLqM35K3_cbXKw3AM1hXPm0fkyBEfRRhAnA@mail.gmail.com
Paul E. McKenney
maintainerQuoted 16 lines · Suraj Upadhyay
Quoted 14 lines · On Sun 19 Jul, 2020, 21:37 Paul E. McKenney, <[email protected]> wrote:
Quoted 3 lines · Suraj Upadhyay
The macro
__list_check_srcuis used as a statement inside a for loop.
__list_check_srcubecomes "true" whenCONFIG_PROVE_RCU_LISTis notdefined.
Quoted 6 lines
This results in compiler warning about an unused value ("true").
Silence the compiler warning about the unused value "true" by replacing it with an empty expression.
Signed-off-by Suraj Upadhyay <[email protected]>Like this, you mean, give or take whitespace? ;-)
Quoted 8 lines
Quoted 6 lines
https://lore.kernel.org/lkml/20200718001259.GY9247@paulmck-ThinkPad-P72/
May I add your Tested-by?
Thanx, Paul
Yeah sure.
Thank you, I have applied it and it will be public on my next rebase. And thank you for your testing efforts!
Thanx, Paul
Quoted 29 lines
Thanks,
Suraj Upadhyay.
Quoted 25 lines
---
include/linux/rculist.h static inline void INIT_LIST_HEAD_RCU(struct list_head
Quoted 8 lines
include/linux/rculist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/rculist.h +0
-0@@ -73,7 +73,7 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head*list)
include/linux/rculist.h static inline void INIT_LIST_HEAD_RCU(struct list_head · line 73
Quoted 1 line
include/linux/rculist.h +0
-0#define __list_check_rcu(dummy, cond, extra...)\Quoted 10 lines
include/linux/rculist.h +1
-2({ check_arg_count_one(extra); }) -#define __list_check_srcu (cond) true +#define __list_check_srcu (cond) ({})#endif /* -- 2.17.1