From: kernel test robot <lkp@intel.com>
To: Charles Wang <charles.goodix@gmail.com>,
dmitry.torokhov@gmail.com, dan.carpenter@linaro.org
Cc: oe-kbuild-all@lists.linux.dev, dianders@chromium.org,
robh@kernel.org, krzk+dt@kernel.org, jikos@kernel.org,
bentiss@kernel.org, hbarnor@chromium.org,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Charles Wang <charles.goodix@gmail.com>
Subject: Re: [PATCH v4 1/2] HID: hid-goodix: Add Goodix HID-over-SPI driver
Date: Sat, 15 Jun 2024 19:57:39 +0800 [thread overview]
Message-ID: <202406151920.jSO2jara-lkp@intel.com> (raw)
In-Reply-To: <20240614121538.236727-2-charles.goodix@gmail.com>
Hi Charles,
kernel test robot noticed the following build warnings:
[auto build test WARNING on hid/for-next]
[also build test WARNING on dtor-input/next dtor-input/for-linus robh/for-next linus/master v6.10-rc3 next-20240613]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Charles-Wang/HID-hid-goodix-Add-Goodix-HID-over-SPI-driver/20240614-201949
base: https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-next
patch link: https://lore.kernel.org/r/20240614121538.236727-2-charles.goodix%40gmail.com
patch subject: [PATCH v4 1/2] HID: hid-goodix: Add Goodix HID-over-SPI driver
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20240615/202406151920.jSO2jara-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240615/202406151920.jSO2jara-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/202406151920.jSO2jara-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/input.h:19,
from include/linux/hid.h:24,
from drivers/hid/hid-goodix-spi.c:9:
drivers/hid/hid-goodix-spi.c: In function 'goodix_spi_read':
>> drivers/hid/hid-goodix-spi.c:147:34: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=]
147 | dev_err(ts->dev, "read data len exceed limit %ld",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/hid-goodix-spi.c:147:17: note: in expansion of macro 'dev_err'
147 | dev_err(ts->dev, "read data len exceed limit %ld",
| ^~~~~~~
drivers/hid/hid-goodix-spi.c:147:64: note: format string is defined here
147 | dev_err(ts->dev, "read data len exceed limit %ld",
| ~~^
| |
| long int
| %d
drivers/hid/hid-goodix-spi.c: In function 'goodix_spi_write':
drivers/hid/hid-goodix-spi.c:181:34: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'unsigned int' [-Wformat=]
181 | dev_err(ts->dev, "write data len exceed limit %ld",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/hid-goodix-spi.c:181:17: note: in expansion of macro 'dev_err'
181 | dev_err(ts->dev, "write data len exceed limit %ld",
| ^~~~~~~
drivers/hid/hid-goodix-spi.c:181:65: note: format string is defined here
181 | dev_err(ts->dev, "write data len exceed limit %ld",
| ~~^
| |
| long int
| %d
vim +147 drivers/hid/hid-goodix-spi.c
137
138 static int goodix_spi_read(struct goodix_ts_data *ts, u32 addr,
139 void *data, size_t len)
140 {
141 struct spi_device *spi = to_spi_device(&ts->spi->dev);
142 struct spi_transfer xfers;
143 struct spi_message spi_msg;
144 int error;
145
146 if (GOODIX_SPI_READ_PREFIX_LEN + len > sizeof(ts->xfer_buf)) {
> 147 dev_err(ts->dev, "read data len exceed limit %ld",
148 sizeof(ts->xfer_buf) - GOODIX_SPI_READ_PREFIX_LEN);
149 return -EINVAL;
150 }
151
152 /* buffer format: 0xF1 + addr(4bytes) + dummy(3bytes) + data */
153 ts->xfer_buf[0] = GOODIX_SPI_READ_FLAG;
154 put_unaligned_be32(addr, ts->xfer_buf + GOODIX_SPI_TRANS_PREFIX_LEN);
155
156 spi_message_init(&spi_msg);
157 memset(&xfers, 0, sizeof(xfers));
158 xfers.tx_buf = ts->xfer_buf;
159 xfers.rx_buf = ts->xfer_buf;
160 xfers.len = GOODIX_SPI_READ_PREFIX_LEN + len;
161 spi_message_add_tail(&xfers, &spi_msg);
162
163 error = spi_sync(spi, &spi_msg);
164 if (error)
165 dev_err(ts->dev, "spi transfer error: %d", error);
166 else
167 memcpy(data, ts->xfer_buf + GOODIX_SPI_READ_PREFIX_LEN, len);
168
169 return error;
170 }
171
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-06-15 11:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 12:15 [PATCH v4 0/2] HID: add initial support for Goodix HID-over-SPI touchscreen Charles Wang
2024-06-14 12:15 ` [PATCH v4 1/2] HID: hid-goodix: Add Goodix HID-over-SPI driver Charles Wang
2024-06-15 11:57 ` kernel test robot [this message]
2024-06-15 18:03 ` kernel test robot
2024-06-16 23:10 ` kernel test robot
2024-06-14 12:15 ` [PATCH v4 2/2] dt-bindings: input: Goodix SPI HID Touchscreen Charles Wang
2024-06-14 13:13 ` Rob Herring (Arm)
2024-06-14 15:26 ` Conor Dooley
2024-06-18 7:15 ` Charles Wang
2024-06-14 15:27 ` Conor Dooley
2024-06-18 7:27 ` Charles Wang
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=202406151920.jSO2jara-lkp@intel.com \
--to=lkp@intel.com \
--cc=bentiss@kernel.org \
--cc=charles.goodix@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hbarnor@chromium.org \
--cc=jikos@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).