[REGRESSION] mainline/master: (build) format ‘ %ld’ expects argument of type ‘long int’, but argument 5 h...

KernelCI bot <[email protected]>
Newsgroups dev.linux.lists.regressions
Message-ID <177883554772.890.14362912312699978244@330cfa3079ca>



Hello,

New build issue found on mainline/master:

---
 format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=] in drivers/hid/hid-core.o (drivers/hid/hid-core.c) [logspec:kbuild,kbuild.compiler.error]
---

- dashboard: https://d.kernelci.org/i/maestro:2c134b9650a439d5a2095ada3b457a32db6a944f
- giturl: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
- commit HEAD:  70eda68668d1476b459b64e69b8f36659fa9dfa8


Please include the KernelCI tag when submitting a fix:

Reported-by: kernelci.org bot <[email protected]>


Log excerpt:
=====================================================
drivers/hid/hid-core.c:2053:43: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
 2053 |                 hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %ld)\n",
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
./include/linux/dev_printk.h:156:61: note: in expansion of macro ‘dev_fmt’
  156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                             ^~~~~~~
./include/linux/dev_printk.h:215:17: note: in expansion of macro ‘dev_warn’
  215 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                 ^~~~~~~~~
./include/linux/dev_printk.h:227:9: note: in expansion of macro ‘dev_level_ratelimited’
  227 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~~
./include/linux/hid.h:1342:9: note: in expansion of macro ‘dev_warn_ratelimited’
 1342 |         dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-core.c:2053:17: note: in expansion of macro ‘hid_warn_ratelimited’
 2053 |                 hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %ld)\n",
      |                 ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-core.c:2053:91: note: format string is defined here
 2053 |                 hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %ld)\n",
      |                                                                                         ~~^
      |                                                                                           |
      |                                                                                           long int
      |                                                                                         %d
drivers/hid/hid-core.c:2075:43: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
 2075 |                 hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %ld)\n",
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ^~~
./include/linux/dev_printk.h:156:61: note: in expansion of macro ‘dev_fmt’
  156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                             ^~~~~~~
./include/linux/dev_printk.h:215:17: note: in expansion of macro ‘dev_warn’
  215 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                 ^~~~~~~~~
./include/linux/dev_printk.h:227:9: note: in expansion of macro ‘dev_level_ratelimited’
  227 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~~
./include/linux/hid.h:1342:9: note: in expansion of macro ‘dev_warn_ratelimited’
 1342 |         dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-core.c:2075:17: note: in expansion of macro ‘hid_warn_ratelimited’
 2075 |                 hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %ld)\n",
      |                 ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-core.c:2075:92: note: format string is defined here
 2075 |                 hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %ld)\n",
      |                                                                                          ~~^
      |                                                                                            |
      |                                                                                            long int
      |                                                                                          %d
  CC      drivers/gpu/drm/i915/intel_runtime_pm.o
  AR      drivers/platform/x86/amd/built-in.a
  CC      drivers/platform/x86/eeepc-laptop.o
  CC      drivers/md/dm-stripe.o
  CC      drivers/firmware/efi/vars.o
  CC      drivers/net/ethernet/realtek/r8169_main.o
cc1: all warnings being treated as errors

=====================================================


# Builds where the incident occurred:

## i386_defconfig on (i386):
- compiler: gcc-14
- config: https://files.kernelci.org/kbuild-gcc-14-i386-6a068f300ed99f002e8a9f04/.config
- dashboard: https://d.kernelci.org/build/maestro:6a068f300ed99f002e8a9f04

## i386_defconfig+kselftest on (i386):
- compiler: gcc-14
- config: https://files.kernelci.org/kbuild-gcc-14-i386-mainline-6a068f3b0ed99f002e8a9f0d/.config
- dashboard: https://d.kernelci.org/build/maestro:6a068f3b0ed99f002e8a9f0d


#kernelci issue maestro:2c134b9650a439d5a2095ada3b457a32db6a944f

--
This is an experimental report format. Please send feedback in!
Talk to us at [email protected]

Made with love by the KernelCI team - https://kernelci.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.