浏览代码

rcutorture: Fix unused-function warning for torturing_tasks()

The torturing_tasks() function is used only in kernels built with
CONFIG_PROVE_RCU=y, so the second definition can result in unused-function
compiler warnings.  This commit adds __maybe_unused to suppress these
warnings.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Paul E. McKenney 10 年之前
父节点
当前提交
4f441a258f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/rcu/rcutorture.c

+ 1 - 1
kernel/rcu/rcutorture.c

@@ -695,7 +695,7 @@ static bool __maybe_unused torturing_tasks(void)
 
 #define RCUTORTURE_TASKS_OPS
 
-static bool torturing_tasks(void)
+static bool __maybe_unused torturing_tasks(void)
 {
 	return false;
 }