* lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'?
@ 2026-09-07 23:42 kernel test robot
2026-09-08 6:32 ` Thomas Weißschuh
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-09-07 23:42 UTC (permalink / raw)
To: Zhan Xusheng; +Cc: oe-kbuild-all, 0day robot, Thomas Weißschuh
tree: https://github.com/intel-lab-lkp/linux/commits/Zhan-Xusheng/vdso-math64-Add-and-use-__iter_div64_u64_rem/20260901-100634
head: 70e38aef8fc8b80bc60e2249e5f2a38c2d1e604b
commit: 70e38aef8fc8b80bc60e2249e5f2a38c2d1e604b vdso/gettimeofday: Assert that the clock id fits the dispatch mask
date: 7 days ago
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260908/202609080117.XY9u2XZ9-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609080117.XY9u2XZ9-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/202609080117.XY9u2XZ9-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from <command-line>:
lib/vdso/gettimeofday.c: In function '__cvdso_clock_gettime_common':
>> lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'? [-Wimplicit-function-declaration]
288 | BUILD_BUG_ON(clock >= BITS_PER_TYPE(msk));
| ^~~~~~~~~~~~~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:40:37: note: in expansion of macro 'compiletime_assert'
40 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:51:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
51 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
lib/vdso/gettimeofday.c:288:9: note: in expansion of macro 'BUILD_BUG_ON'
288 | BUILD_BUG_ON(clock >= BITS_PER_TYPE(msk));
| ^~~~~~~~~~~~
make[3]: *** [arch/powerpc/kernel/vdso/Makefile:95: arch/powerpc/kernel/vdso/vgettimeofday-32.o] Error 1
make[3]: Target 'include/generated/vdso32-offsets.h' not remade because of errors.
make[2]: *** [arch/powerpc/Makefile:395: vdso_prepare] 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 +288 lib/vdso/gettimeofday.c
273
274 static __always_inline bool
275 __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,
276 struct __kernel_timespec *ts)
277 {
278 const struct vdso_clock *vc = vd->clock_data;
279 u32 msk;
280
281 if (!vdso_clockid_valid(clock))
282 return false;
283
284 /*
285 * Convert the clockid to a bitmask and use it to check which
286 * clocks are handled in the VDSO directly.
287 */
> 288 BUILD_BUG_ON(clock >= BITS_PER_TYPE(msk));
289 msk = 1U << clock;
290 if (likely(msk & VDSO_HRES))
291 vc = &vc[CS_HRES_COARSE];
292 else if (msk & VDSO_COARSE)
293 return do_coarse(vd, &vc[CS_HRES_COARSE], clock, ts);
294 else if (msk & VDSO_RAW)
295 vc = &vc[CS_RAW];
296 else if (msk & VDSO_AUX)
297 return do_aux(vd, clock, ts);
298 else
299 return false;
300
301 return do_hres(vd, vc, clock, ts);
302 }
303
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'?
2026-09-07 23:42 lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'? kernel test robot
@ 2026-09-08 6:32 ` Thomas Weißschuh
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Weißschuh @ 2026-09-08 6:32 UTC (permalink / raw)
To: Zhan Xusheng; +Cc: kernel test robot, oe-kbuild-all
Hi Zhan,
On Tue, Sep 08, 2026 at 01:42:57AM +0200, kernel test robot wrote:
> tree: https://github.com/intel-lab-lkp/linux/commits/Zhan-Xusheng/vdso-math64-Add-and-use-__iter_div64_u64_rem/20260901-100634
> head: 70e38aef8fc8b80bc60e2249e5f2a38c2d1e604b
> commit: 70e38aef8fc8b80bc60e2249e5f2a38c2d1e604b vdso/gettimeofday: Assert that the clock id fits the dispatch mask
> date: 7 days ago
> config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260908/202609080117.XY9u2XZ9-lkp@intel.com/config)
> compiler: powerpc64-linux-gcc (GCC) 16.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609080117.XY9u2XZ9-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/202609080117.XY9u2XZ9-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> In file included from <command-line>:
> lib/vdso/gettimeofday.c: In function '__cvdso_clock_gettime_common':
> >> lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'? [-Wimplicit-function-declaration]
> 288 | BUILD_BUG_ON(clock >= BITS_PER_TYPE(msk));
Instead of including linux/bit.h from the vDSO code, could you move
BITS_PER_TYPE and BITS_PER_BYTE to vdso/bits.h and use it from there?
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-08 6:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 23:42 lib/vdso/gettimeofday.c:288:31: error: implicit declaration of function 'BITS_PER_TYPE'; did you mean 'BITS_PER_LONG'? kernel test robot
2026-09-08 6:32 ` Thomas Weißschuh
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.