public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Yury Norov <yury.norov@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build warning after merge of the bitmap tree
Date: Fri, 15 Jul 2022 22:22:55 +1000	[thread overview]
Message-ID: <20220715222255.2e7fae53@canb.auug.org.au> (raw)

[-- 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 --]

             reply	other threads:[~2022-07-15 12:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 12:22 Stephen Rothwell [this message]
2022-07-15 13:40 ` linux-next: build warning after merge of the bitmap tree Yury Norov
  -- strict thread matches above, loose matches on Subject: below --
2025-07-10  8:34 Stephen Rothwell
2025-07-10  8:44 ` Ben Horgan
2025-07-10 12:00   ` Stephen Rothwell
2022-04-20  7:55 Stephen Rothwell
2022-04-20  8:29 ` Yury Norov

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=20220715222255.2e7fae53@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=yury.norov@gmail.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