From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Pratyush Yadav <p.yadav@ti.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/2] spi: fsl-spi: Implement trailing bits
Date: Tue, 1 Mar 2022 02:28:13 +0800 [thread overview]
Message-ID: <202203010254.tIHIltE2-lkp@intel.com> (raw)
In-Reply-To: <fe4a3946a66ede73f6d6871700f2aaf0171372a1.1646060734.git.christophe.leroy@csgroup.eu>
Hi Christophe,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.17-rc6]
[cannot apply to broonie-spi/for-next next-20220228]
[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/Christophe-Leroy/Add-support-for-components-requiring-trailing-clock-after-transfer/20220228-231740
base: 7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3
config: hexagon-buildonly-randconfig-r004-20220228 (https://download.01.org/0day-ci/archive/20220301/202203010254.tIHIltE2-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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/7eb07c4d26401389204fcc6cf685c18c89b64ef8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/Add-support-for-components-requiring-trailing-clock-after-transfer/20220228-231740
git checkout 7eb07c4d26401389204fcc6cf685c18c89b64ef8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/spi/
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 >>):
>> drivers/spi/spi-fsl-spi.c:435:14: warning: incompatible integer to pointer conversion initializing 'const void *' with an expression of type 'unsigned long' [-Wint-conversion]
.tx_buf = empty_zero_page,
^~~~~~~~~~~~~~~
1 warning generated.
vim +435 drivers/spi/spi-fsl-spi.c
356
357 static int fsl_spi_do_one_msg(struct spi_master *master,
358 struct spi_message *m)
359 {
360 struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master);
361 struct spi_device *spi = m->spi;
362 struct spi_transfer *t, *first;
363 unsigned int cs_change;
364 const int nsecs = 50;
365 int status, last_bpw;
366
367 /*
368 * In CPU mode, optimize large byte transfers to use larger
369 * bits_per_word values to reduce number of interrupts taken.
370 */
371 if (!(mpc8xxx_spi->flags & SPI_CPM_MODE)) {
372 list_for_each_entry(t, &m->transfers, transfer_list) {
373 if (t->len < 256 || t->bits_per_word != 8)
374 continue;
375 if ((t->len & 3) == 0)
376 t->bits_per_word = 32;
377 else if ((t->len & 1) == 0)
378 t->bits_per_word = 16;
379 }
380 }
381
382 /* Don't allow changes if CS is active */
383 cs_change = 1;
384 list_for_each_entry(t, &m->transfers, transfer_list) {
385 if (cs_change)
386 first = t;
387 cs_change = t->cs_change;
388 if (first->speed_hz != t->speed_hz) {
389 dev_err(&spi->dev,
390 "speed_hz cannot change while CS is active\n");
391 return -EINVAL;
392 }
393 }
394
395 last_bpw = -1;
396 cs_change = 1;
397 status = -EINVAL;
398 list_for_each_entry(t, &m->transfers, transfer_list) {
399 if (cs_change || last_bpw != t->bits_per_word)
400 status = fsl_spi_setup_transfer(spi, t);
401 if (status < 0)
402 break;
403 last_bpw = t->bits_per_word;
404
405 if (cs_change) {
406 fsl_spi_chipselect(spi, BITBANG_CS_ACTIVE);
407 ndelay(nsecs);
408 }
409 cs_change = t->cs_change;
410 if (t->len)
411 status = fsl_spi_bufs(spi, t, m->is_dma_mapped);
412 if (status) {
413 status = -EMSGSIZE;
414 break;
415 }
416 m->actual_length += t->len;
417
418 spi_transfer_delay_exec(t);
419
420 if (cs_change) {
421 ndelay(nsecs);
422 fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE);
423 ndelay(nsecs);
424 }
425 }
426
427 if (status || !cs_change) {
428 ndelay(nsecs);
429 fsl_spi_chipselect(spi, BITBANG_CS_INACTIVE);
430 }
431
432 if (!status && spi->trailing_bits) {
433 struct spi_transfer t = {
434 .len = 1,
> 435 .tx_buf = empty_zero_page,
436 };
437
438 if (spi->trailing_bits < 4)
439 t.bits_per_word = 4;
440 else if (spi->trailing_bits > 8)
441 t.bits_per_word = 16;
442 else
443 t.bits_per_word = spi->trailing_bits;
444
445 status = fsl_spi_setup_transfer(spi, &t);
446 if (!status)
447 status = fsl_spi_bufs(spi, &t, 0);
448 }
449 m->status = status;
450
451 fsl_spi_setup_transfer(spi, NULL);
452 spi_finalize_current_message(master);
453 return 0;
454 }
455
---
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-28 18:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 15:15 [PATCH v2 0/2] Add support for components requiring trailing clock after transfer Christophe Leroy
2022-02-28 15:15 ` [PATCH v2 1/2] spi: Add optional number of additional clock cycles to be generated Christophe Leroy
2022-03-08 0:52 ` Rob Herring
2022-02-28 15:15 ` [PATCH v2 2/2] spi: fsl-spi: Implement trailing bits Christophe Leroy
2022-02-28 15:29 ` Mark Brown
2022-02-28 16:02 ` Christophe Leroy
2022-02-28 16:14 ` Mark Brown
2022-03-01 12:53 ` Christophe Leroy
2022-03-01 13:25 ` Mark Brown
2022-08-18 18:35 ` Christophe Leroy
2022-08-22 17:15 ` Mark Brown
2022-08-22 18:38 ` Christophe Leroy
2022-08-22 19:29 ` Mark Brown
2022-02-28 18:28 ` kernel test robot [this message]
2022-02-28 18:38 ` kernel test robot
2022-02-28 18:48 ` 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=202203010254.tIHIltE2-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=devicetree@vger.kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=p.yadav@ti.com \
--cc=robh+dt@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).