[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200719105037.GA21010@blackclown>
Date: Sun, 19 Jul 2020 16:20:37 +0530
From: Suraj Upadhyay <usuraj35@...il.com>
To: paulmck@...nel.org, josh@...htriplett.org, rostedt@...dmis.org,
mathieu.desnoyers@...icios.com, jiangshanlai@...il.com,
joel@...lfernandes.org, madhuparnabhowmik10@...il.com
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Suraj Upadhyay <usuraj35@...il.com>
---
include/linux/rculist.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index de9385b9158e..8b8e0584c473 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -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
/*
--
2.17.1
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists