]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing: avoid build warning with HAVE_NOP_MCOUNT
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 5 Jun 2019 11:11:58 +0000 (13:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:52:28 +0000 (09:52 +0200)
commitb61581d5c2d3236645bf387bc418fe9310661f8b
tree6e923432031cdd3678e868851e4e7bbdfb40cdc7
parent12006942792bba95db84339ab8cc7a28b525226d
tracing: avoid build warning with HAVE_NOP_MCOUNT

[ Upstream commit cbdaeaf050b730ea02e9ab4ff844ce54d85dbe1d ]

Selecting HAVE_NOP_MCOUNT enables -mnop-mcount (if gcc supports it)
and sets CC_USING_NOP_MCOUNT. Reuse __is_defined (which is suitable for
testing CC_USING_* defines) to avoid conditional compilation and fix
the following gcc 9 warning on s390:

kernel/trace/ftrace.c:2514:1: warning: ‘ftrace_code_disable’ defined
but not used [-Wunused-function]

Link: http://lkml.kernel.org/r/patch.git-1a82d13f33ac.your-ad-here.call-01559732716-ext-6629@work.hours
Fixes: 2f4df0017baed ("tracing: Add -mcount-nop option support")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/ftrace.c