Re: linux-next: build failure in final build
From: Nathan Chancellor
Date: Mon May 18 2026 - 15:24:15 EST
On Mon, May 18, 2026 at 05:21:54PM +0100, Mark Brown wrote:
> Hi all,
>
> During the final build today's linux-next build (i386 defconfig) failed
> like this:
>
> In file included from /tmp/next/build/include/linux/device.h:15,
> from /tmp/next/build/include/linux/input.h:19,
> from /tmp/next/build/drivers/hid/hid-core.c:25:
> /tmp/next/build/drivers/hid/hid-core.c: In function 'hid_report_raw_event':
> /tmp/next/build/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",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
> 110 | _p_func(dev, fmt, ##__VA_ARGS__); \
> | ^~~
> /tmp/next/build/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__)
> | ^~~~~~~
> /tmp/next/build/include/linux/dev_printk.h:215:17: note: in expansion of macro 'dev_warn'
> 215 | dev_level(dev, fmt, ##__VA_ARGS__); \
> | ^~~~~~~~~
> /tmp/next/build/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__)
> | ^~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/hid.h:1342:9: note: in expansion of macro 'dev_warn_ratelimited'
> 1342 | dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
> | ^~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/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",
> | ^~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/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
> /tmp/next/build/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",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
> 110 | _p_func(dev, fmt, ##__VA_ARGS__); \
> | ^~~
> /tmp/next/build/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__)
> | ^~~~~~~
> /tmp/next/build/include/linux/dev_printk.h:215:17: note: in expansion of macro 'dev_warn'
> 215 | dev_level(dev, fmt, ##__VA_ARGS__); \
> | ^~~~~~~~~
> /tmp/next/build/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__)
> | ^~~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/include/linux/hid.h:1342:9: note: in expansion of macro 'dev_warn_ratelimited'
> 1342 | dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
> | ^~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/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",
> | ^~~~~~~~~~~~~~~~~~~~
> /tmp/next/build/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
> cc1: all warnings being treated as errors
>
> Caused by commit
>
> 2c85c61d1332e (HID: pass the buffer size to hid_report_raw_event)
>
> for which I applied a revert (note that the commit is in Linus' tree),
> also covering 206342541fc88 (HID: core: introduce
> hid_safe_input_report()).
I submitted
https://lore.kernel.org/20260517-hid-core-fix-size_t-specifier-v1-1-bfdd959ec383@xxxxxxxxxx/
for this, which you could apply instead of the revert. Given how simple
it is, maybe Linus could just apply it directly to unbreak both trees?
--
Cheers,
Nathan