From: kernel test robot <lkp@intel.com>
To: Hector Martin <marcan@marcan.st>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Janne Grunau <j@jannau.net>
Subject: [asahilinux:bits/090-spi-hid 18/19] drivers/hid/dockchannel-hid/dockchannel-hid.c:987:18: warning: format specifies type 'long' but the argument has type '__size_t' (aka 'unsigned int')
Date: Sun, 10 May 2026 04:36:43 +0800 [thread overview]
Message-ID: <202605100420.YhXKJxAo-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux bits/090-spi-hid
head: 7b3c6e8461f3035d025ece758919facbc1c6d854
commit: e9ca8c87d173cbf7eb2089d7ddec9149e1d608a1 [18/19] HID: Add Apple DockChannel HID transport driver
config: arm-randconfig-004-20260510 (https://download.01.org/0day-ci/archive/20260510/202605100420.YhXKJxAo-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260510/202605100420.YhXKJxAo-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/202605100420.YhXKJxAo-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hid/dockchannel-hid/dockchannel-hid.c:987:18: warning: format specifies type 'long' but the argument has type '__size_t' (aka 'unsigned int') [-Wformat]
986 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
| ~~~
| %zu
987 | shdr->length, hdr->length - sizeof(*shdr));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
1 warning generated.
vim +987 drivers/hid/dockchannel-hid/dockchannel-hid.c
979
980 static void dchid_handle_ack(struct dchid_iface *iface, struct dchid_hdr *hdr, void *data)
981 {
982 struct dchid_subhdr *shdr = (void *)data;
983 u8 *payload = data + sizeof(*shdr);
984
985 if (shdr->length + sizeof(*shdr) > hdr->length) {
986 dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
> 987 shdr->length, hdr->length - sizeof(*shdr));
988 return;
989 }
990 if (shdr->flags != iface->out_flags) {
991 dev_err(iface->dchid->dev,
992 "Received unexpected flags 0x%x on ACK channel (expFected 0x%x)\n",
993 shdr->flags, iface->out_flags);
994 return;
995 }
996
997 if (shdr->length < 1) {
998 dev_err(iface->dchid->dev, "Received length 0 output report ack\n");
999 return;
1000 }
1001 if (iface->tx_seq != hdr->seq) {
1002 dev_err(iface->dchid->dev, "Received ACK with bad seq (expected %d, got %d)\n",
1003 iface->tx_seq, hdr->seq);
1004 return;
1005 }
1006 if (iface->out_report != payload[0]) {
1007 dev_err(iface->dchid->dev, "Received ACK with bad report (expected %d, got %d\n",
1008 iface->out_report, payload[0]);
1009 return;
1010 }
1011
1012 if (iface->resp_buf && iface->resp_size)
1013 memcpy(iface->resp_buf, payload + 1, min((size_t)shdr->length - 1, iface->resp_size));
1014
1015 iface->resp_size = shdr->length;
1016 iface->out_report = -1;
1017 iface->retcode = shdr->retcode;
1018 complete(&iface->out_complete);
1019 }
1020
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-09 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-09 20:36 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-08-04 14:53 [asahilinux:bits/090-spi-hid 18/19] drivers/hid/dockchannel-hid/dockchannel-hid.c:987:18: warning: format specifies type 'long' but the argument has type '__size_t' (aka 'unsigned int') kernel test robot
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=202605100420.YhXKJxAo-lkp@intel.com \
--to=lkp@intel.com \
--cc=j@jannau.net \
--cc=llvm@lists.linux.dev \
--cc=marcan@marcan.st \
--cc=oe-kbuild-all@lists.linux.dev \
/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