* linux-next: build warning after merge of the bitmap tree
@ 2022-07-15 12:22 Stephen Rothwell
2022-07-15 13:40 ` Yury Norov
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2022-07-15 12:22 UTC (permalink / raw)
To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 14090 bytes --]
Hi all,
After merging the bitmap tree, today's linux-next build (arm64 defconfig)
produced this warning:
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c: In function 'setup_resources':
drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
4999 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5000:49: note: format string is defined here
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
4999 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5000:60: note: format string is defined here
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
4999 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5000:74: note: format string is defined here
5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
5010 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5011:49: note: format string is defined here
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
5010 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5011:60: note: format string is defined here
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
5010 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5011:71: note: format string is defined here
5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5022:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
5022 | "Channels: %d (tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:5021:17: note: in expansion of macro 'dev_info'
5021 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5022:49: note: format string is defined here
5022 | "Channels: %d (tchan: %u, rchan: %u)\n",
| ~^
| |
| unsigned int
| %lu
In file included from include/linux/device.h:15,
from include/linux/dmaengine.h:8,
from drivers/dma/ti/k3-udma.c:9:
drivers/dma/ti/k3-udma.c:5022:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
5022 | "Channels: %d (tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/dma/ti/k3-udma.c:5021:17: note: in expansion of macro 'dev_info'
5021 | dev_info(dev,
| ^~~~~~~~
drivers/dma/ti/k3-udma.c:5022:60: note: format string is defined here
5022 | "Channels: %d (tchan: %u, rchan: %u)\n",
| ~^
| |
| unsigned int
| %lu
Introduced by commit
31563fb891aa ("lib/bitmap: change type of bitmap_weight to unsigned long")
I have applied the following patch for today:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 15 Jul 2022 22:15:40 +1000
Subject: [PATCH] fix up for k3-udma.c
due to "lib/bitmap: change type of bitmap_weight to unsigned long"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/dma/ti/k3-udma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 2f0d2c68c93c..07cb48db76ba 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4997,7 +4997,7 @@ static int setup_resources(struct udma_dev *ud)
switch (ud->match_data->type) {
case DMA_TYPE_UDMA:
dev_info(dev,
- "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
+ "Channels: %d (tchan: %lu, rchan: %lu, gp-rflow: %lu)\n",
ch_count,
ud->tchan_cnt - bitmap_weight(ud->tchan_map,
ud->tchan_cnt),
@@ -5008,7 +5008,7 @@ static int setup_resources(struct udma_dev *ud)
break;
case DMA_TYPE_BCDMA:
dev_info(dev,
- "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
+ "Channels: %d (bchan: %lu, tchan: %lu, rchan: %lu)\n",
ch_count,
ud->bchan_cnt - bitmap_weight(ud->bchan_map,
ud->bchan_cnt),
@@ -5019,7 +5019,7 @@ static int setup_resources(struct udma_dev *ud)
break;
case DMA_TYPE_PKTDMA:
dev_info(dev,
- "Channels: %d (tchan: %u, rchan: %u)\n",
+ "Channels: %d (tchan: %lu, rchan: %lu)\n",
ch_count,
ud->tchan_cnt - bitmap_weight(ud->tchan_map,
ud->tchan_cnt),
--
2.35.1
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: linux-next: build warning after merge of the bitmap tree
2022-07-15 12:22 linux-next: build warning after merge of the bitmap tree Stephen Rothwell
@ 2022-07-15 13:40 ` Yury Norov
0 siblings, 0 replies; 4+ messages in thread
From: Yury Norov @ 2022-07-15 13:40 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Linux Kernel Mailing List, Linux Next Mailing List
On Fri, Jul 15, 2022 at 10:22:55PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the bitmap tree, today's linux-next build (arm64 defconfig)
> produced this warning:
Fixed, thanks.
(I found some issues of this sort with allyesconfig, but not this one.)
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c: In function 'setup_resources':
> drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
> 4999 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5000:49: note: format string is defined here
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
> 4999 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5000:60: note: format string is defined here
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5000:26: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:4999:17: note: in expansion of macro 'dev_info'
> 4999 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5000:74: note: format string is defined here
> 5000 | "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
> 5010 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5011:49: note: format string is defined here
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
> 5010 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5011:60: note: format string is defined here
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5011:26: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'long unsigned int' [-Wformat=]
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:5010:17: note: in expansion of macro 'dev_info'
> 5010 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5011:71: note: format string is defined here
> 5011 | "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5022:26: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
> 5022 | "Channels: %d (tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:5021:17: note: in expansion of macro 'dev_info'
> 5021 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5022:49: note: format string is defined here
> 5022 | "Channels: %d (tchan: %u, rchan: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
> In file included from include/linux/device.h:15,
> from include/linux/dmaengine.h:8,
> from drivers/dma/ti/k3-udma.c:9:
> drivers/dma/ti/k3-udma.c:5022:26: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'long unsigned int' [-Wformat=]
> 5022 | "Channels: %d (tchan: %u, rchan: %u)\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:150:58: note: in expansion of macro 'dev_fmt'
> 150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/dma/ti/k3-udma.c:5021:17: note: in expansion of macro 'dev_info'
> 5021 | dev_info(dev,
> | ^~~~~~~~
> drivers/dma/ti/k3-udma.c:5022:60: note: format string is defined here
> 5022 | "Channels: %d (tchan: %u, rchan: %u)\n",
> | ~^
> | |
> | unsigned int
> | %lu
>
> Introduced by commit
>
> 31563fb891aa ("lib/bitmap: change type of bitmap_weight to unsigned long")
>
> I have applied the following patch for today:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 15 Jul 2022 22:15:40 +1000
> Subject: [PATCH] fix up for k3-udma.c
>
> due to "lib/bitmap: change type of bitmap_weight to unsigned long"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/dma/ti/k3-udma.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
> index 2f0d2c68c93c..07cb48db76ba 100644
> --- a/drivers/dma/ti/k3-udma.c
> +++ b/drivers/dma/ti/k3-udma.c
> @@ -4997,7 +4997,7 @@ static int setup_resources(struct udma_dev *ud)
> switch (ud->match_data->type) {
> case DMA_TYPE_UDMA:
> dev_info(dev,
> - "Channels: %d (tchan: %u, rchan: %u, gp-rflow: %u)\n",
> + "Channels: %d (tchan: %lu, rchan: %lu, gp-rflow: %lu)\n",
> ch_count,
> ud->tchan_cnt - bitmap_weight(ud->tchan_map,
> ud->tchan_cnt),
> @@ -5008,7 +5008,7 @@ static int setup_resources(struct udma_dev *ud)
> break;
> case DMA_TYPE_BCDMA:
> dev_info(dev,
> - "Channels: %d (bchan: %u, tchan: %u, rchan: %u)\n",
> + "Channels: %d (bchan: %lu, tchan: %lu, rchan: %lu)\n",
> ch_count,
> ud->bchan_cnt - bitmap_weight(ud->bchan_map,
> ud->bchan_cnt),
> @@ -5019,7 +5019,7 @@ static int setup_resources(struct udma_dev *ud)
> break;
> case DMA_TYPE_PKTDMA:
> dev_info(dev,
> - "Channels: %d (tchan: %u, rchan: %u)\n",
> + "Channels: %d (tchan: %lu, rchan: %lu)\n",
> ch_count,
> ud->tchan_cnt - bitmap_weight(ud->tchan_map,
> ud->tchan_cnt),
> --
> 2.35.1
>
> --
> Cheers,
> Stephen Rothwell
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: build warning after merge of the bitmap tree
2022-04-20 7:55 Stephen Rothwell
@ 2022-04-20 8:29 ` Yury Norov
0 siblings, 0 replies; 4+ messages in thread
From: Yury Norov @ 2022-04-20 8:29 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linux Kernel Mailing List, Linux Next Mailing List, Maxim Kuvyrkov
Hi Stephen,
(Adding Maxim Kuvyrkov from linaro/TCWG as he might be interested in
arm part of this.
On Wed, Apr 20, 2022 at 12:55 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> After merging the bitmap tree, today's linux-next build (htmldocs)
> produced this warning:
>
> Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:425: WARNING: Unexpected indentation.
> Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:426: WARNING: Block quote ends without a blank line; unexpected unindent.
> Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:431: WARNING: Unexpected indentation.
>
> Introduced by commit
>
> 6f46c24da767 ("bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions")
I'll build docs and fix those warnings. Thanks for pointing this out.
From previous linux-next build message:
> ../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int, int)'
> 21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
> | ^~~~~~~~~~~~~~~~~~~
> In file included from ../lib/bitmap.c:6:
> tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int, unsigned int)'
> 15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
> | ^~~~~~~~~~~~~~~~~~~
> ../lib/bitmap.c: In function '__bitmap_weight_cmp':
> ../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
> 26 | if (w + bits - k * BITS_PER_LONG < num)
> | ^
> ../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
> 31 | if (w > num)
> | ^
> cc1: all warnings being treated as errors
> tools/perf/../lib/bitmap.c:21:5: error: conflicting types for '__bitmap_weight_cmp'; have 'int(const long unsigned int *, unsigned int, int)'
> 21 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits, int num)
> | ^~~~~~~~~~~~~~~~~~~
> In file included from tools/perf/../lib/bitmap.c:6:
> tools/include/linux/bitmap.h:15:5: note: previous declaration of '__bitmap_weight_cmp' with type 'int(const long unsigned int *, unsigned int, unsigned int)'
> 15 | int __bitmap_weight_cmp(const unsigned long *bitmap, unsigned int bits,
> | ^~~~~~~~~~~~~~~~~~~
> tools/perf/../lib/bitmap.c: In function '__bitmap_weight_cmp':
> tools/perf/../lib/bitmap.c:26:50: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
> 26 | if (w + bits - k * BITS_PER_LONG < num)
> | ^
> tools/perf/../lib/bitmap.c:31:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
> 31 | if (w > num)
> | ^
> cc1: all warnings being treated as errors
I fixed tools build error and updated the bitmap-for-next branch. The
problem is that tools/perf
enables -Werror=sign-compare, and main kernel not. So direct copying
of functions from kernel
to tools doesn't work. This might be an issue by itself because I
think it would be better to keep
kernel and tools code consistent whenever possible.
Another problem is that the tools lacks testing from (obviously) me,
0-day and TCWG. I added
tools/perf to my testing build suite, and found that the build fails
for arm and s390 on v5.18-rc2.
See tools/perf build log attached.
Thanks,
Yury
s390:
PERF_VERSION = 5.18.rc2.gce522ba9ef7e
In file included from /usr/s390x-linux-gnu/include/stdio.h:866,
from
/home/yury/work/linux/tools/lib/perf/include/perf/cpumap.h:7,
from util/session.c:13:
In function ‘printf’,
inlined from ‘dump_event’ at util/session.c:1292:2,
inlined from ‘machines__deliver_event’ at util/session.c:1502:2,
inlined from ‘perf_session__deliver_synth_event’ at util/session.c:1703:9:
/usr/s390x-linux-gnu/include/bits/stdio2.h:112:10: error: ‘%s’
directive argument is null [-Werror=format-overflow=]
112 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util/session.c: In function ‘perf_session__deliver_synth_event’:
util/session.c:1292:25: note: format string is defined here
1292 | printf("\n%#" PRIx64 "@%s [%#x]: event: %d\n",
| ^~
cc1: all warnings being treated as errors
arm:
PERF_VERSION = 5.18.rc2.gce522ba9ef7e
/tmp/ccHIlKZJ.s: Assembler messages:
/tmp/ccHIlKZJ.s:541: Error: selected processor does not support `ldrd
r0,r1,[r2]' in ARM mode
/tmp/ccHIlKZJ.s:630: Error: selected processor does not support `strd
r4,r5,[r3]' in ARM mode
make[9]: *** [/home/yury/work/linux/tools/build/Makefile.build:96:
/home/yury/work/linux/build/arm/tools/perf/arch/arm/util/auxtrace.o]
Error 1
^ permalink raw reply [flat|nested] 4+ messages in thread
* linux-next: build warning after merge of the bitmap tree
@ 2022-04-20 7:55 Stephen Rothwell
2022-04-20 8:29 ` Yury Norov
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2022-04-20 7:55 UTC (permalink / raw)
To: Yury Norov; +Cc: Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Hi all,
After merging the bitmap tree, today's linux-next build (htmldocs)
produced this warning:
Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:425: WARNING: Unexpected indentation.
Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:426: WARNING: Block quote ends without a blank line; unexpected unindent.
Documentation/core-api/kernel-api:87: /home/sfr/next/next/include/linux/bitmap.h:431: WARNING: Unexpected indentation.
Introduced by commit
6f46c24da767 ("bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-15 13:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-15 12:22 linux-next: build warning after merge of the bitmap tree Stephen Rothwell
2022-07-15 13:40 ` Yury Norov
-- strict thread matches above, loose matches on Subject: below --
2022-04-20 7:55 Stephen Rothwell
2022-04-20 8:29 ` Yury Norov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.