[REGRESSION] mainline/master: (build) format specifies type 'long' but the argument has type 'size_t' (a...

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



Hello,

New build issue found on mainline/master:

---
 format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat] in drivers/hid/hid-core.o (drivers/hid/hid-core.c) [logspec:kbuild,kbuild.compiler.error]
---

- dashboard: https://d.kernelci.org/i/maestro:6790c78db860b3d911e9ad88aac9854e2ed77dc5
- 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:
=====================================================
/tmp/kci/linux/drivers/hid/hid-core.c:2054:29: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
 2053 |                 hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %ld)\n",
      |                                                                                         ~~~
      |                                                                                         %zu
 2054 |                                      report->id, csize, bsize);
      |                                                         ^~~~~
/tmp/kci/linux/include/linux/hid.h:1342:43: note: expanded from macro 'hid_warn_ratelimited'
 1342 |         dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
      |                                           ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:227:46: note: expanded from macro 'dev_warn_ratelimited'
  227 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |                                              ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:215:25: note: expanded from macro 'dev_level_ratelimited'
  215 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                                ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:156:70: note: expanded from macro 'dev_warn'
  156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                                     ~~~     ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ~~~    ^~~~~~~~~~~
/tmp/kci/linux/drivers/hid/hid-core.c:2076:29: error: format specifies type 'long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
 2075 |                 hid_warn_ratelimited(hid, "Event data for report %d was too short (%d vs %ld)\n",
      |                                                                                          ~~~
      |                                                                                          %zu
 2076 |                                      report->id, rsize, bsize);
      |                                                         ^~~~~
/tmp/kci/linux/include/linux/hid.h:1342:43: note: expanded from macro 'hid_warn_ratelimited'
 1342 |         dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
      |                                           ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:227:46: note: expanded from macro 'dev_warn_ratelimited'
  227 |         dev_level_ratelimited(dev_warn, dev, fmt, ##__VA_ARGS__)
      |                                              ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:215:25: note: expanded from macro 'dev_level_ratelimited'
  215 |                 dev_level(dev, fmt, ##__VA_ARGS__);                     \
      |                                ~~~    ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:156:70: note: expanded from macro 'dev_warn'
  156 |         dev_printk_index_wrap(_dev_warn, KERN_WARNING, dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                                                                     ~~~     ^~~~~~~~~~~
/tmp/kci/linux/include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                              ~~~    ^~~~~~~~~~~
2 errors generated.

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


# Builds where the incident occurred:

## defconfig+allmodconfig+CONFIG_FRAME_WARN=2048 on (arm):
- compiler: clang-21
- config: None
- dashboard: https://d.kernelci.org/build/maestro:6a068eb70ed99f002e8a9e67

## i386_defconfig+allmodconfig+CONFIG_FRAME_WARN=2048 on (i386):
- compiler: clang-21
- config: https://files.kernelci.org/kbuild-clang-21-i386-allmodconfig-6a068f340ed99f002e8a9f07/.config
- dashboard: https://d.kernelci.org/build/maestro:6a068f340ed99f002e8a9f07


#kernelci issue maestro:6790c78db860b3d911e9ad88aac9854e2ed77dc5

--
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.