From: kernel test robot <lkp@intel.com>
To: Janne Grunau <j@jannau.net>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [asahilinux:bits/090-spi-hid 28/28] drivers/hid/dockchannel-hid/dockchannel-hid.c:986:44: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int'
Date: Tue, 19 Nov 2024 00:10:52 +0800 [thread overview]
Message-ID: <202411190001.61jZPc0K-lkp@intel.com> (raw)
tree: https://github.com/AsahiLinux/linux bits/090-spi-hid
head: 501868c5f377ff4155041d111e0bea3c499b97a8
commit: 501868c5f377ff4155041d111e0bea3c499b97a8 [28/28] fixup! hid: Add Apple DockChannel HID transport driver
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20241119/202411190001.61jZPc0K-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241119/202411190001.61jZPc0K-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/202411190001.61jZPc0K-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from drivers/hid/dockchannel-hid/dockchannel-hid.c:10:
drivers/hid/dockchannel-hid/dockchannel-hid.c: In function 'dchid_handle_ack':
>> drivers/hid/dockchannel-hid/dockchannel-hid.c:986:44: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=]
986 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %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:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/hid/dockchannel-hid/dockchannel-hid.c:986:17: note: in expansion of macro 'dev_err'
986 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
| ^~~~~~~
drivers/hid/dockchannel-hid/dockchannel-hid.c:986:75: note: format string is defined here
986 | dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
| ~~^
| |
| long int
| %d
vim +986 drivers/hid/dockchannel-hid/dockchannel-hid.c
c11b68c3111573 Hector Martin 2022-07-08 979
c11b68c3111573 Hector Martin 2022-07-08 980 static void dchid_handle_ack(struct dchid_iface *iface, struct dchid_hdr *hdr, void *data)
c11b68c3111573 Hector Martin 2022-07-08 981 {
c11b68c3111573 Hector Martin 2022-07-08 982 struct dchid_subhdr *shdr = (void *)data;
c11b68c3111573 Hector Martin 2022-07-08 983 u8 *payload = data + sizeof(*shdr);
c11b68c3111573 Hector Martin 2022-07-08 984
c11b68c3111573 Hector Martin 2022-07-08 985 if (shdr->length + sizeof(*shdr) > hdr->length) {
c11b68c3111573 Hector Martin 2022-07-08 @986 dev_err(iface->dchid->dev, "Bad sub header length (%d > %ld)\n",
c11b68c3111573 Hector Martin 2022-07-08 987 shdr->length, hdr->length - sizeof(*shdr));
c11b68c3111573 Hector Martin 2022-07-08 988 return;
c11b68c3111573 Hector Martin 2022-07-08 989 }
c11b68c3111573 Hector Martin 2022-07-08 990 if (shdr->flags != iface->out_flags) {
c11b68c3111573 Hector Martin 2022-07-08 991 dev_err(iface->dchid->dev,
c11b68c3111573 Hector Martin 2022-07-08 992 "Received unexpected flags 0x%x on ACK channel (expFected 0x%x)\n",
c11b68c3111573 Hector Martin 2022-07-08 993 shdr->flags, iface->out_flags);
c11b68c3111573 Hector Martin 2022-07-08 994 return;
c11b68c3111573 Hector Martin 2022-07-08 995 }
c11b68c3111573 Hector Martin 2022-07-08 996
c11b68c3111573 Hector Martin 2022-07-08 997 if (shdr->length < 1) {
c11b68c3111573 Hector Martin 2022-07-08 998 dev_err(iface->dchid->dev, "Received length 0 output report ack\n");
c11b68c3111573 Hector Martin 2022-07-08 999 return;
c11b68c3111573 Hector Martin 2022-07-08 1000 }
c11b68c3111573 Hector Martin 2022-07-08 1001 if (iface->tx_seq != hdr->seq) {
c11b68c3111573 Hector Martin 2022-07-08 1002 dev_err(iface->dchid->dev, "Received ACK with bad seq (expected %d, got %d)\n",
c11b68c3111573 Hector Martin 2022-07-08 1003 iface->tx_seq, hdr->seq);
c11b68c3111573 Hector Martin 2022-07-08 1004 return;
c11b68c3111573 Hector Martin 2022-07-08 1005 }
c11b68c3111573 Hector Martin 2022-07-08 1006 if (iface->out_report != payload[0]) {
c11b68c3111573 Hector Martin 2022-07-08 1007 dev_err(iface->dchid->dev, "Received ACK with bad report (expected %d, got %d\n",
c11b68c3111573 Hector Martin 2022-07-08 1008 iface->out_report, payload[0]);
c11b68c3111573 Hector Martin 2022-07-08 1009 return;
c11b68c3111573 Hector Martin 2022-07-08 1010 }
c11b68c3111573 Hector Martin 2022-07-08 1011
c11b68c3111573 Hector Martin 2022-07-08 1012 if (iface->resp_buf && iface->resp_size)
c11b68c3111573 Hector Martin 2022-07-08 1013 memcpy(iface->resp_buf, payload + 1, min((size_t)shdr->length - 1, iface->resp_size));
c11b68c3111573 Hector Martin 2022-07-08 1014
c11b68c3111573 Hector Martin 2022-07-08 1015 iface->resp_size = shdr->length;
c11b68c3111573 Hector Martin 2022-07-08 1016 iface->out_report = -1;
c11b68c3111573 Hector Martin 2022-07-08 1017 iface->retcode = shdr->retcode;
c11b68c3111573 Hector Martin 2022-07-08 1018 complete(&iface->out_complete);
c11b68c3111573 Hector Martin 2022-07-08 1019 }
c11b68c3111573 Hector Martin 2022-07-08 1020
:::::: The code at line 986 was first introduced by commit
:::::: c11b68c31115734ab97565fb48c065ea5fd2d1bf hid: Add Apple DockChannel HID transport driver
:::::: TO: Hector Martin <marcan@marcan.st>
:::::: CC: Janne Grunau <j@jannau.net>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-11-18 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202411190001.61jZPc0K-lkp@intel.com \
--to=lkp@intel.com \
--cc=j@jannau.net \
--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 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.