From: kernel test robot <lkp@intel.com>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>,
linux-spi@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, broonie@kernel.org, robh+dt@kernel.org,
andy.shevchenko@gmail.com, dragos.bogdan@analog.com,
Alexandru Ardelean <alexandru.ardelean@analog.com>
Subject: Re: [PATCH v2 1/3] spi: convert to BIT() all spi_device flags
Date: Tue, 24 Nov 2020 19:41:13 +0800 [thread overview]
Message-ID: <202011241920.ygGHVBJg-lkp@intel.com> (raw)
In-Reply-To: <20201124102152.16548-1-alexandru.ardelean@analog.com>
[-- Attachment #1: Type: text/plain, Size: 10298 bytes --]
Hi Alexandru,
I love your patch! Perhaps something to improve:
[auto build test WARNING on spi/for-next]
[also build test WARNING on next-20201123]
[cannot apply to v5.10-rc5]
[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/Alexandru-Ardelean/spi-convert-to-BIT-all-spi_device-flags/20201124-181801
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: i386-randconfig-a016-20201124 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/1d45734a72568cc2118c14f912affda571a5f9dc
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexandru-Ardelean/spi-convert-to-BIT-all-spi_device-flags/20201124-181801
git checkout 1d45734a72568cc2118c14f912affda571a5f9dc
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/dmaengine.h:8,
from drivers/spi/spi-stm32.c:11:
drivers/spi/spi-stm32.c: In function 'stm32_spi_prepare_msg':
>> drivers/spi/spi-stm32.c:1030:20: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spi/spi-stm32.c:1030:2: note: in expansion of macro 'dev_dbg'
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~
drivers/spi/spi-stm32.c:1030:27: note: format string is defined here
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/spi/spi-stm32.c:11:
drivers/spi/spi-stm32.c:1030:20: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spi/spi-stm32.c:1030:2: note: in expansion of macro 'dev_dbg'
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~
drivers/spi/spi-stm32.c:1030:35: note: format string is defined here
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/spi/spi-stm32.c:11:
drivers/spi/spi-stm32.c:1030:20: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spi/spi-stm32.c:1030:2: note: in expansion of macro 'dev_dbg'
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~
drivers/spi/spi-stm32.c:1030:48: note: format string is defined here
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/spi/spi-stm32.c:11:
drivers/spi/spi-stm32.c:1030:20: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=]
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
19 | #define dev_fmt(fmt) fmt
| ^~~
drivers/spi/spi-stm32.c:1030:2: note: in expansion of macro 'dev_dbg'
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ^~~~~~~
drivers/spi/spi-stm32.c:1030:59: note: format string is defined here
1030 | dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
| ~^
| |
| int
| %ld
vim +1030 drivers/spi/spi-stm32.c
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 995
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 996 /**
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 997 * stm32_spi_prepare_msg - set up the controller to transfer a single message
1c52be8bed83e1a Alain Volmat 2020-03-20 998 * @master: controller master interface
1c52be8bed83e1a Alain Volmat 2020-03-20 999 * @msg: pointer to spi message
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1000 */
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1001 static int stm32_spi_prepare_msg(struct spi_master *master,
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1002 struct spi_message *msg)
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1003 {
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1004 struct stm32_spi *spi = spi_master_get_devdata(master);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1005 struct spi_device *spi_dev = msg->spi;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1006 struct device_node *np = spi_dev->dev.of_node;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1007 unsigned long flags;
55166853b2f56ce Cezary Gapinski 2018-12-24 1008 u32 clrb = 0, setb = 0;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1009
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1010 /* SPI slave device may need time between data frames */
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1011 spi->cur_midi = 0;
042c1c60df7b854 Amelie Delaunay 2017-06-27 1012 if (np && !of_property_read_u32(np, "st,spi-midi-ns", &spi->cur_midi))
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1013 dev_dbg(spi->dev, "%dns inter-data idleness\n", spi->cur_midi);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1014
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1015 if (spi_dev->mode & SPI_CPOL)
55166853b2f56ce Cezary Gapinski 2018-12-24 1016 setb |= spi->cfg->regs->cpol.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1017 else
55166853b2f56ce Cezary Gapinski 2018-12-24 1018 clrb |= spi->cfg->regs->cpol.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1019
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1020 if (spi_dev->mode & SPI_CPHA)
55166853b2f56ce Cezary Gapinski 2018-12-24 1021 setb |= spi->cfg->regs->cpha.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1022 else
55166853b2f56ce Cezary Gapinski 2018-12-24 1023 clrb |= spi->cfg->regs->cpha.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1024
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1025 if (spi_dev->mode & SPI_LSB_FIRST)
55166853b2f56ce Cezary Gapinski 2018-12-24 1026 setb |= spi->cfg->regs->lsb_first.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1027 else
55166853b2f56ce Cezary Gapinski 2018-12-24 1028 clrb |= spi->cfg->regs->lsb_first.mask;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1029
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 @1030 dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1031 spi_dev->mode & SPI_CPOL,
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1032 spi_dev->mode & SPI_CPHA,
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1033 spi_dev->mode & SPI_LSB_FIRST,
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1034 spi_dev->mode & SPI_CS_HIGH);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1035
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1036 spin_lock_irqsave(&spi->lock, flags);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1037
55166853b2f56ce Cezary Gapinski 2018-12-24 1038 /* CPOL, CPHA and LSB FIRST bits have common register */
55166853b2f56ce Cezary Gapinski 2018-12-24 1039 if (clrb || setb)
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1040 writel_relaxed(
55166853b2f56ce Cezary Gapinski 2018-12-24 1041 (readl_relaxed(spi->base + spi->cfg->regs->cpol.reg) &
55166853b2f56ce Cezary Gapinski 2018-12-24 1042 ~clrb) | setb,
55166853b2f56ce Cezary Gapinski 2018-12-24 1043 spi->base + spi->cfg->regs->cpol.reg);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1044
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1045 spin_unlock_irqrestore(&spi->lock, flags);
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1046
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1047 return 0;
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1048 }
dcbe0d84dfa5a3e Amelie Delaunay 2017-06-21 1049
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 41568 bytes --]
next prev parent reply other threads:[~2020-11-24 11:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 10:21 [PATCH v2 1/3] spi: convert to BIT() all spi_device flags Alexandru Ardelean
2020-11-24 10:21 ` [PATCH v2 2/3] spi: Add SPI_NO_TX/RX support Alexandru Ardelean
2020-11-24 10:21 ` [PATCH v2 3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-bus-width properties Alexandru Ardelean
2020-11-24 11:41 ` kernel test robot [this message]
2020-11-24 11:41 ` [PATCH v2 1/3] spi: convert to BIT() all spi_device flags kernel test robot
2020-11-24 11:49 ` Andy Shevchenko
2020-11-24 12:03 ` Ardelean, Alexandru
2020-11-24 13:55 ` Andy Shevchenko
2020-11-24 11:47 ` Andy Shevchenko
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=202011241920.ygGHVBJg-lkp@intel.com \
--to=lkp@intel.com \
--cc=alexandru.ardelean@analog.com \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dragos.bogdan@analog.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--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).