]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
rcutorture: Fix unused-function warning for torturing_tasks()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 24 Aug 2015 20:13:51 +0000 (13:13 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 6 Oct 2015 18:28:09 +0000 (11:28 -0700)
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>
kernel/rcu/rcutorture.c

index b74b56474e1730902216816c36aa9af98575d601..009b62c76dfa5c8dffa3c65c3986f8ce5f1fcf8a 100644 (file)
@@ -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;
 }