Commit 6b1ca46a authored by Vasily Gorbik's avatar Vasily Gorbik
Browse files

s390/test_unwind: avoid build warning with W=1



Fix the following build warning with W=1

arch/s390/lib/test_unwind.c:172:21: warning: variable 'fops' set but not used [-Wunused-but-set-variable]
        struct ftrace_ops *fops;

Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent df5a95f4
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -210,19 +210,18 @@ static noinline int test_unwind_ftraced_func(struct unwindme *u)

static int test_unwind_ftrace(struct unwindme *u)
{
	struct ftrace_ops *fops;
	int ret;
#ifdef CONFIG_DYNAMIC_FTRACE
	struct ftrace_ops *fops;

#ifndef CONFIG_DYNAMIC_FTRACE
	kunit_skip(current_test, "requires CONFIG_DYNAMIC_FTRACE");
	fops = NULL; /* used */
#else
	fops = kunit_kzalloc(current_test, sizeof(*fops), GFP_KERNEL);
	fops->func = test_unwind_ftrace_handler;
	fops->flags = FTRACE_OPS_FL_DYNAMIC |
		     FTRACE_OPS_FL_RECURSION |
		     FTRACE_OPS_FL_SAVE_REGS |
		     FTRACE_OPS_FL_PERMANENT;
#else
	kunit_skip(current_test, "requires CONFIG_DYNAMIC_FTRACE");
#endif

	ret = ftrace_set_filter_ip(fops, (unsigned long)test_unwind_ftraced_func, 0, 0);