From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [tglx-devel:irqflags 17/20] include/linux/math64.h:106:15: error: call to undeclared function 'is_power_of_2'; ISO C99 and later do not support implicit function declarations
Date: Sun, 30 Aug 2026 06:13:01 +0800 [thread overview]
Message-ID: <202608300655.4x1xVMdw-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git irqflags
head: 59394501f5a285ef270931207a67d2f129403151
commit: f0f1f20d167c74ea3bf43b179ce88214100b21a5 [17/20] irqflags: Provide refcounted local_irq_*() variants
config: arm-defconfig (https://download.01.org/0day-ci/archive/20260830/202608300655.4x1xVMdw-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 52774473867e49b5891ab9381accf4e5a3ce0024)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260830/202608300655.4x1xVMdw-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608300655.4x1xVMdw-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
>> include/linux/math64.h:106:15: error: call to undeclared function 'is_power_of_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
106 | *remainder = do_div(dividend, divisor);
| ^
include/asm-generic/div64.h:185:6: note: expanded from macro 'do_div'
185 | is_power_of_2(__base)) { \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
>> include/linux/math64.h:106:15: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:187:11: note: expanded from macro 'do_div'
187 | (n) >>= ilog2(__base); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
>> include/linux/math64.h:106:15: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:191:9: note: expanded from macro 'do_div'
191 | (n) = __div64_const32(n, __base); \
| ^
include/asm-generic/div64.h:81:14: note: expanded from macro '__div64_const32'
81 | ___p = 1 << ilog2(___b); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:304:14: error: call to undeclared function 'is_power_of_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
304 | rl.l.high = do_div(rh.ll, divisor);
| ^
include/asm-generic/div64.h:185:6: note: expanded from macro 'do_div'
185 | is_power_of_2(__base)) { \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:304:14: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:187:11: note: expanded from macro 'do_div'
187 | (n) >>= ilog2(__base); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:304:14: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:191:9: note: expanded from macro 'do_div'
191 | (n) = __div64_const32(n, __base); \
| ^
include/asm-generic/div64.h:81:14: note: expanded from macro '__div64_const32'
81 | ___p = 1 << ilog2(___b); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:307:2: error: call to undeclared function 'is_power_of_2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
307 | do_div(rl.ll, divisor);
| ^
include/asm-generic/div64.h:185:6: note: expanded from macro 'do_div'
185 | is_power_of_2(__base)) { \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:307:2: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:187:11: note: expanded from macro 'do_div'
187 | (n) >>= ilog2(__base); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:14:
In file included from include/linux/restart_block.h:9:
In file included from include/linux/time64.h:5:
include/linux/math64.h:307:2: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
include/asm-generic/div64.h:191:9: note: expanded from macro 'do_div'
191 | (n) = __div64_const32(n, __base); \
| ^
include/asm-generic/div64.h:81:14: note: expanded from macro '__div64_const32'
81 | ___p = 1 << ilog2(___b); \
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:62:
In file included from arch/arm/include/asm/thread_info.h:14:
In file included from arch/arm/include/asm/page.h:189:
>> include/asm-generic/getorder.h:38:10: error: call to undeclared function 'ilog2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
38 | return ilog2((size) - 1) - PAGE_SHIFT + 1;
| ^
>> include/asm-generic/getorder.h:44:9: error: call to undeclared function 'fls'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
44 | return fls(size);
| ^
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:62:
>> arch/arm/include/asm/thread_info.h:40:39: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
40 | DECLARE_PER_CPU(struct task_struct *, __entry_task);
| ^
| int
arch/arm/include/asm/thread_info.h:40:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
40 | DECLARE_PER_CPU(struct task_struct *, __entry_task);
| ^
| int
>> arch/arm/include/asm/thread_info.h:115:16: error: use of undeclared identifier 'MODE_MASK'
115 | .cpsr_mask = MODE_MASK | PSR_T_BIT,
| ^~~~~~~~~
>> arch/arm/include/asm/thread_info.h:115:28: error: use of undeclared identifier 'PSR_T_BIT'
115 | .cpsr_mask = MODE_MASK | PSR_T_BIT,
| ^~~~~~~~~
>> arch/arm/include/asm/thread_info.h:116:15: error: use of undeclared identifier 'USR_MODE'
116 | .cpsr_val = USR_MODE,
| ^~~~~~~~
In file included from kernel/bounds.c:14:
In file included from include/linux/log2.h:12:
In file included from include/linux/bitops.h:67:
In file included from arch/arm/include/asm/bitops.h:28:
In file included from include/linux/irqflags.h:16:
In file included from include/linux/preempt.h:109:
In file included from ./arch/arm/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
>> include/linux/thread_info.h:104:2: error: call to undeclared function 'set_bit'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
104 | set_bit(flag, (unsigned long *)&ti->flags);
| ^
>> include/linux/thread_info.h:109:2: error: call to undeclared function 'clear_bit'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
109 | clear_bit(flag, (unsigned long *)&ti->flags);
| ^
>> include/linux/thread_info.h:123:9: error: call to undeclared function 'test_and_set_bit'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
123 | return test_and_set_bit(flag, (unsigned long *)&ti->flags);
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [scripts/Makefile.build:185: kernel/bounds.s] Error 1
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1414: prepare0] Error 2
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:248: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/is_power_of_2 +106 include/linux/math64.h
f910381a55cdaa0 Sasha Levin 2012-03-15 102
2418f4f28f8467b Roman Zippel 2008-05-01 103 #ifndef div_u64_rem
2418f4f28f8467b Roman Zippel 2008-05-01 104 static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
2418f4f28f8467b Roman Zippel 2008-05-01 105 {
2418f4f28f8467b Roman Zippel 2008-05-01 @106 *remainder = do_div(dividend, divisor);
2418f4f28f8467b Roman Zippel 2008-05-01 107 return dividend;
2418f4f28f8467b Roman Zippel 2008-05-01 108 }
2418f4f28f8467b Roman Zippel 2008-05-01 109 #endif
2418f4f28f8467b Roman Zippel 2008-05-01 110
:::::: The code at line 106 was first introduced by commit
:::::: 2418f4f28f8467b92a6177af32d05737ebf6206c introduce explicit signed/unsigned 64bit divide
:::::: TO: Roman Zippel <zippel@linux-m68k.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-29 22:13 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=202608300655.4x1xVMdw-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tglx@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox