DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] rawdev: fix build with clang 21
@ 2025-11-04 13:08 David Marchand
  2025-11-05  7:16 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: David Marchand @ 2025-11-04 13:08 UTC (permalink / raw)
  To: dev; +Cc: stable, Sachin Saxena, Hemant Agrawal, Shreyansh Jain

Fix 16-bits formatting issues reported by clang 21 on Fedora 43:

../lib/rawdev/rte_rawdev.c:429:41: error: format specifies type
	'unsigned char' but the argument has type 'uint16_t'
	(aka 'unsigned short') [-Werror,-Wformat]
  429 |         RTE_RDEV_DEBUG("Start dev_id=%" PRIu8, dev_id);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

../lib/rawdev/rte_rawdev.c:435:9: error: format specifies type
	'unsigned char' but the argument has type 'uint16_t'
	(aka 'unsigned short') [-Werror,-Wformat]
  434 |         RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already started",
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435 |                      dev_id);
      |                      ^~~~~~~

../lib/rawdev/rte_rawdev.c:457:40: error: format specifies type
	'unsigned char' but the argument has type 'uint16_t'
	(aka 'unsigned short') [-Werror,-Wformat]
  457 |         RTE_RDEV_DEBUG("Stop dev_id=%" PRIu8, dev_id);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

../lib/rawdev/rte_rawdev.c:464:4: error: format specifies type
	'unsigned char' but the argument has type 'uint16_t'
	(aka 'unsigned short') [-Werror,-Wformat]
  463 |         RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already stopped",
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  464 |                 dev_id);
      |                 ^~~~~~~

Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/rawdev/rte_rawdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/rawdev/rte_rawdev.c b/lib/rawdev/rte_rawdev.c
index f21d29114c..d193061842 100644
--- a/lib/rawdev/rte_rawdev.c
+++ b/lib/rawdev/rte_rawdev.c
@@ -426,12 +426,12 @@ rte_rawdev_start(uint16_t dev_id)
 	struct rte_rawdev *dev;
 	int diag;
 
-	RTE_RDEV_DEBUG("Start dev_id=%" PRIu8, dev_id);
+	RTE_RDEV_DEBUG("Start dev_id=%" PRIu16, dev_id);
 
 	RTE_RAWDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
 	dev = &rte_rawdevs[dev_id];
 	if (dev->started != 0) {
-		RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already started",
+		RTE_RDEV_ERR("Device with dev_id=%" PRIu16 "already started",
 			     dev_id);
 		return 0;
 	}
@@ -454,13 +454,13 @@ rte_rawdev_stop(uint16_t dev_id)
 {
 	struct rte_rawdev *dev;
 
-	RTE_RDEV_DEBUG("Stop dev_id=%" PRIu8, dev_id);
+	RTE_RDEV_DEBUG("Stop dev_id=%" PRIu16, dev_id);
 
 	RTE_RAWDEV_VALID_DEVID_OR_RET(dev_id);
 	dev = &rte_rawdevs[dev_id];
 
 	if (dev->started == 0) {
-		RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already stopped",
+		RTE_RDEV_ERR("Device with dev_id=%" PRIu16 "already stopped",
 			dev_id);
 		return;
 	}
-- 
2.51.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rawdev: fix build with clang 21
  2025-11-04 13:08 [PATCH] rawdev: fix build with clang 21 David Marchand
@ 2025-11-05  7:16 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2025-11-05  7:16 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, stable, Sachin Saxena, Hemant Agrawal, Shreyansh Jain

On Tue, 4 Nov 2025 at 14:08, David Marchand <david.marchand@redhat.com> wrote:
>
> Fix 16-bits formatting issues reported by clang 21 on Fedora 43:
>
> ../lib/rawdev/rte_rawdev.c:429:41: error: format specifies type
>         'unsigned char' but the argument has type 'uint16_t'
>         (aka 'unsigned short') [-Werror,-Wformat]
>   429 |         RTE_RDEV_DEBUG("Start dev_id=%" PRIu8, dev_id);
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
>
> ../lib/rawdev/rte_rawdev.c:435:9: error: format specifies type
>         'unsigned char' but the argument has type 'uint16_t'
>         (aka 'unsigned short') [-Werror,-Wformat]
>   434 |         RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already started",
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   435 |                      dev_id);
>       |                      ^~~~~~~
>
> ../lib/rawdev/rte_rawdev.c:457:40: error: format specifies type
>         'unsigned char' but the argument has type 'uint16_t'
>         (aka 'unsigned short') [-Werror,-Wformat]
>   457 |         RTE_RDEV_DEBUG("Stop dev_id=%" PRIu8, dev_id);
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
>
> ../lib/rawdev/rte_rawdev.c:464:4: error: format specifies type
>         'unsigned char' but the argument has type 'uint16_t'
>         (aka 'unsigned short') [-Werror,-Wformat]
>   463 |         RTE_RDEV_ERR("Device with dev_id=%" PRIu8 "already stopped",
>       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   464 |                 dev_id);
>       |                 ^~~~~~~
>
> Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-05  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 13:08 [PATCH] rawdev: fix build with clang 21 David Marchand
2025-11-05  7:16 ` David Marchand

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).