From: kernel test robot <lkp@intel.com>
To: Magnus Lindholm <linmag7@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Matt Turner <mattst88@gmail.com>
Subject: include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_iowrite64' which is not static
Date: Mon, 30 Nov 2026 10:20:02 +0100 [thread overview]
Message-ID: <20261130101047.sTN5jjdA-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fe6ff8d5d675c01793b9f051d16055dd4aa75244
commit: d1ee975398a357be8f56836a87ae55c51770e4f0 alpha: enable lockdep hardirq state tracking
date: 4 months ago
config: alpha-randconfig-2200-20261130 (https://download.01.org/0day-ci/archive/20261130/20261130101047.sTN5jjdA-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.4.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261130/20261130101047.sTN5jjdA-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: d1ee975398a3 ("alpha: enable lockdep hardirq state tracking")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261130101047.sTN5jjdA-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/array_size.h:5,
from include/linux/kernel.h:16,
from arch/alpha/kernel/sys_rawhide.c:12:
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'ev5_flush_tlb_current_page' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/tlbflush.h:32:9: note: in expansion of macro 'if'
32 | if (vma->vm_flags & VM_EXEC)
| ^~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_iowrite64' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:353:9: note: in expansion of macro 'if'
353 | if (!__mcpcia_is_mmio(addr))
| ^~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_ioread64' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:343:9: note: in expansion of macro 'if'
343 | if (!__mcpcia_is_mmio(addr))
| ^~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_iowrite32' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:333:9: note: in expansion of macro 'if'
333 | if (!__mcpcia_is_mmio(addr))
| ^~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_ioread32' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:323:9: note: in expansion of macro 'if'
323 | if (!__mcpcia_is_mmio(addr))
| ^~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_iowrite16' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:261:9: note: in expansion of macro 'if'
261 | if (__mcpcia_is_mmio(hose)) { \
| ^~
arch/alpha/include/asm/core_mcpcia.h:313:9: note: in expansion of macro 'MCPCIA_FROB_MMIO'
313 | MCPCIA_FROB_MMIO;
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_ioread16' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:261:9: note: in expansion of macro 'if'
261 | if (__mcpcia_is_mmio(hose)) { \
| ^~
arch/alpha/include/asm/core_mcpcia.h:301:9: note: in expansion of macro 'MCPCIA_FROB_MMIO'
301 | MCPCIA_FROB_MMIO;
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_iowrite8' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:261:9: note: in expansion of macro 'if'
261 | if (__mcpcia_is_mmio(hose)) { \
| ^~
arch/alpha/include/asm/core_mcpcia.h:289:9: note: in expansion of macro 'MCPCIA_FROB_MMIO'
289 | MCPCIA_FROB_MMIO;
| ^~~~~~~~~~~~~~~~
>> include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'mcpcia_ioread8' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/core_mcpcia.h:261:9: note: in expansion of macro 'if'
261 | if (__mcpcia_is_mmio(hose)) { \
| ^~
arch/alpha/include/asm/core_mcpcia.h:277:9: note: in expansion of macro 'MCPCIA_FROB_MMIO'
277 | MCPCIA_FROB_MMIO;
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'ev5_switch_mm' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/mmu_context.h:148:9: note: in expansion of macro 'if'
148 | if ((mmc ^ asn) & ~HARDWARE_ASN_MASK) {
| ^~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function '__get_new_mm_context' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/mmu_context.h:124:9: note: in expansion of macro 'if'
124 | if ((asn & HARDWARE_ASN_MASK) >= MAX_ASN) {
| ^~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'set_hae' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/io.h:47:9: note: in expansion of macro 'if'
47 | if (new_hae != alpha_mv.hae_cache)
| ^~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function 'pte_clear' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
include/linux/compiler_types.h:682:17: note: in expansion of macro 'if'
682 | if (!(condition)) \
| ^~
include/linux/compiler_types.h:690:9: note: in expansion of macro '__compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:60:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
60 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/alpha/include/asm/pgtable.h:214:9: note: in expansion of macro 'WRITE_ONCE'
214 | WRITE_ONCE(pte_val(*ptep), 0);
| ^~~~~~~~~~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function '__memset' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/string.h:36:17: note: in expansion of macro 'if'
36 | if (__builtin_constant_p(n)) {
| ^~
include/linux/compiler.h:63:17: warning: '__if_trace' is static but declared in inline function '__memset' which is not static
63 | __if_trace = { \
| ^~~~~~~~~~
include/linux/compiler.h:57:69: note: in expansion of macro '__trace_if_value'
57 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:55:28: note: in expansion of macro '__trace_if_var'
55 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/alpha/include/asm/string.h:35:9: note: in expansion of macro 'if'
35 | if (__builtin_constant_p(c)) {
vim +63 include/linux/compiler.h
2bcd521a684cc9 Steven Rostedt 2008-11-21 49
2bcd521a684cc9 Steven Rostedt 2008-11-21 50 #ifdef CONFIG_PROFILE_ALL_BRANCHES
2bcd521a684cc9 Steven Rostedt 2008-11-21 51 /*
2bcd521a684cc9 Steven Rostedt 2008-11-21 52 * "Define 'is'", Bill Clinton
2bcd521a684cc9 Steven Rostedt 2008-11-21 53 * "Define 'if'", Steven Rostedt
2bcd521a684cc9 Steven Rostedt 2008-11-21 54 */
a15fd609ad53a6 Linus Torvalds 2019-03-20 @55 #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
a15fd609ad53a6 Linus Torvalds 2019-03-20 56
a15fd609ad53a6 Linus Torvalds 2019-03-20 @57 #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
a15fd609ad53a6 Linus Torvalds 2019-03-20 58
a15fd609ad53a6 Linus Torvalds 2019-03-20 59 #define __trace_if_value(cond) ({ \
2bcd521a684cc9 Steven Rostedt 2008-11-21 60 static struct ftrace_branch_data \
e04462fb82f8dd Miguel Ojeda 2018-09-03 61 __aligned(4) \
33def8498fdde1 Joe Perches 2020-10-21 62 __section("_ftrace_branch") \
a15fd609ad53a6 Linus Torvalds 2019-03-20 @63 __if_trace = { \
2bcd521a684cc9 Steven Rostedt 2008-11-21 64 .func = __func__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 65 .file = __FILE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 66 .line = __LINE__, \
2bcd521a684cc9 Steven Rostedt 2008-11-21 67 }; \
a15fd609ad53a6 Linus Torvalds 2019-03-20 68 (cond) ? \
a15fd609ad53a6 Linus Torvalds 2019-03-20 69 (__if_trace.miss_hit[1]++,1) : \
a15fd609ad53a6 Linus Torvalds 2019-03-20 70 (__if_trace.miss_hit[0]++,0); \
a15fd609ad53a6 Linus Torvalds 2019-03-20 71 })
a15fd609ad53a6 Linus Torvalds 2019-03-20 72
:::::: The code at line 63 was first introduced by commit
:::::: a15fd609ad53a631a927c6680e8fb606f42a712b tracing: Simplify "if" macro code
:::::: TO: Linus Torvalds <torvalds@linux-foundation.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@goodmis.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-11-30 9:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130101047.sTN5jjdA-lkp@intel.com \
--to=lkp@intel.com \
--cc=linmag7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.