2021-01-04 03:26:01

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the spi tree

Hi all,

After merging the spi tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

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

Introduced by commit

f7005142dace ("spi: uapi: unify SPI modes into a single spi.h header")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-04 08:11:30

by Alexandru Ardelean

[permalink] [raw]
Subject: RE: linux-next: build warning after merge of the spi tree



> -----Original Message-----
> From: Stephen Rothwell <[email protected]>
> Sent: Monday, January 4, 2021 2:07 AM
> To: Mark Brown <[email protected]>
> Cc: Ardelean, Alexandru <[email protected]>; Andy Shevchenko
> <[email protected]>; Linux Kernel Mailing List <linux-
> [email protected]>; Linux Next Mailing List <[email protected]>
> Subject: linux-next: build warning after merge of the spi tree
>
> [External]
>
> Hi all,
>
> After merging the spi tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
>

Apologies for this.
Will send a fix.


> 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
>
> Introduced by commit
>
> f7005142dace ("spi: uapi: unify SPI modes into a single spi.h header")
>
> --
> Cheers,
> Stephen Rothwell