From: kernel test robot <lkp@intel.com>
To: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Cc: kbuild-all@lists.01.org, mdf@kernel.org, hao.wu@intel.com,
yilun.xu@intel.com, trix@redhat.com,
linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org,
system@metrotek.ru, Ivan Bornyakov <i.bornyakov@metrotek.ru>
Subject: Re: [PATCH] fpga: microsemi-spi: add Microsemi FPGA manager
Date: Tue, 15 Feb 2022 04:34:24 +0800 [thread overview]
Message-ID: <202202150434.i0eTuy1u-lkp@intel.com> (raw)
In-Reply-To: <20220214133835.25097-1-i.bornyakov@metrotek.ru>
Hi Ivan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.17-rc4 next-20220214]
[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]
url: https://github.com/0day-ci/linux/commits/Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 754e0b0e35608ed5206d6a67a791563c631cec07
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150434.i0eTuy1u-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/19d9c174f03a9b8387ba654d558351cac9d63d24
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923
git checkout 19d9c174f03a9b8387ba654d558351cac9d63d24
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/fpga/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c: In function 'microsemi_fpga_ops_write':
>> drivers/fpga/microsemi-spi.c:244:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
244 | dev_err(dev, "Failed to find bitstream start %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:17: note: in expansion of macro 'dev_err'
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:63: note: format string is defined here
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:252:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
252 | dev_err(dev, "Failed to parse bitstream size %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:17: note: in expansion of macro 'dev_err'
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:63: note: format string is defined here
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:70: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:89: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
>> drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:107: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:274:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
274 | "Failed to write bitstream frame number %d of %d\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:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:273:25: note: in expansion of macro 'dev_err'
273 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:274:80: note: format string is defined here
274 | "Failed to write bitstream frame number %d of %d\n",
| ~^
| |
| int
| %ld
vim +244 drivers/fpga/microsemi-spi.c
225
226 static int microsemi_fpga_ops_write(struct fpga_manager *mgr, const char *buf,
227 size_t count)
228 {
229 ssize_t bitstream_start = 0, bitstream_size;
230 struct microsemi_fpga_priv *priv = mgr->priv;
231 struct spi_device *spi = priv->spi;
232 struct device *dev = &mgr->dev;
233 u8 tmp_buf[SPI_FRAME_SIZE + 1];
234 int ret, i;
235
236 if (crc_ccitt(0, buf, count)) {
237 dev_err(dev, "CRC error\n");
238
239 return -EINVAL;
240 }
241
242 bitstream_start = lookup_block_start(BITSTREAM_ID, buf, count);
243 if (bitstream_start < 0) {
> 244 dev_err(dev, "Failed to find bitstream start %d\n",
245 bitstream_start);
246
247 return bitstream_start;
248 }
249
250 bitstream_size = parse_bitstream_size(buf, count);
251 if (bitstream_size < 0) {
252 dev_err(dev, "Failed to parse bitstream size %d\n",
253 bitstream_size);
254
255 return bitstream_size;
256 }
257
258 if (bitstream_start + bitstream_size * SPI_FRAME_SIZE > count) {
259 dev_err(dev,
> 260 "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
261 bitstream_start, bitstream_size * SPI_FRAME_SIZE, count);
262
263 return -EFAULT;
264 }
265
266 for (i = 0; i < bitstream_size; i++) {
267 tmp_buf[0] = SPI_FRAME;
268 memcpy(tmp_buf + 1, buf + bitstream_start + i * SPI_FRAME_SIZE,
269 SPI_FRAME_SIZE);
270
271 ret = microsemi_spi_write(spi, tmp_buf, sizeof(tmp_buf));
272 if (ret) {
273 dev_err(dev,
274 "Failed to write bitstream frame number %d of %d\n",
275 i, bitstream_size);
276
277 return ret;
278 }
279 }
280
281 return 0;
282 }
283
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2022-02-14 20:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 13:38 [PATCH] fpga: microsemi-spi: add Microsemi FPGA manager Ivan Bornyakov
2022-02-14 19:22 ` kernel test robot
2022-02-14 20:34 ` kernel test robot [this message]
2022-02-15 11:58 ` [PATCH v2] " Ivan Bornyakov
2022-02-15 17:37 ` Conor Dooley
2022-02-15 17:52 ` Moritz Fischer
2022-02-15 18:05 ` Ivan Bornyakov
2022-02-16 12:55 ` Conor.Dooley
2022-02-16 15:56 ` [PATCH v3] fpga: microchip-spi: add Microchip " Ivan Bornyakov
2022-02-17 19:18 ` [PATCH v4] " Ivan Bornyakov
2022-02-18 15:22 ` Conor.Dooley
2022-02-19 5:45 ` Ivan Bornyakov
2022-02-18 16:05 ` Xu Yilun
2022-02-19 6:16 ` Ivan Bornyakov
2022-02-19 10:42 ` Ivan Bornyakov
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=202202150434.i0eTuy1u-lkp@intel.com \
--to=lkp@intel.com \
--cc=hao.wu@intel.com \
--cc=i.bornyakov@metrotek.ru \
--cc=kbuild-all@lists.01.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=system@metrotek.ru \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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).