diff mbox series

[v3] examples/rxtx_callbacks: fix port ID format specifier

Message ID 20210505215435.22336-1-dmitry.kozliuk@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series [v3] examples/rxtx_callbacks: fix port ID format specifier | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional fail Functional Testing issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/checkpatch success coding style OK

Commit Message

Dmitry Kozlyuk May 5, 2021, 9:54 p.m. UTC
This fixes -Wformat warning with clang 10.0.0 on Windows.

Fixes: f8244c6399d9 ("ethdev: increase port id range")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
v3: PRIx16 -> PRIu16
v2: u% and a cast -> PRIx16 (Tyler, Thomas)
 examples/rxtx_callbacks/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Hemminger May 6, 2021, 2:56 a.m. UTC | #1
On Thu,  6 May 2021 00:54:35 +0300
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:

> This fixes -Wformat warning with clang 10.0.0 on Windows.
> 
> Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
> v3: PRIx16 -> PRIu16
> v2: u% and a cast -> PRIx16 (Tyler, Thomas)
>  examples/rxtx_callbacks/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
> index b57b2fc6bc..192521c3c6 100644
> --- a/examples/rxtx_callbacks/main.c
> +++ b/examples/rxtx_callbacks/main.c
> @@ -329,7 +329,7 @@ main(int argc, char *argv[])
>  	/* initialize all ports */
>  	RTE_ETH_FOREACH_DEV(portid)
>  		if (port_init(portid, mbuf_pool) != 0)
> -			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
> +			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16"\n",
>  					portid)

Ok, that matches what is used in rte_ethdev.h

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Thomas Monjalon May 12, 2021, 7:37 p.m. UTC | #2
06/05/2021 04:56, Stephen Hemminger:
> On Thu,  6 May 2021 00:54:35 +0300
> Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
> 
> > This fixes -Wformat warning with clang 10.0.0 on Windows.
> > 
> > Fixes: f8244c6399d9 ("ethdev: increase port id range")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > ---
> > v3: PRIx16 -> PRIu16
> > v2: u% and a cast -> PRIx16 (Tyler, Thomas)
> >  examples/rxtx_callbacks/main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
> > index b57b2fc6bc..192521c3c6 100644
> > --- a/examples/rxtx_callbacks/main.c
> > +++ b/examples/rxtx_callbacks/main.c
> > @@ -329,7 +329,7 @@ main(int argc, char *argv[])
> >  	/* initialize all ports */
> >  	RTE_ETH_FOREACH_DEV(portid)
> >  		if (port_init(portid, mbuf_pool) != 0)
> > -			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
> > +			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16"\n",
> >  					portid)
> 
> Ok, that matches what is used in rte_ethdev.h
> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks
diff mbox series

Patch

diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index b57b2fc6bc..192521c3c6 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -329,7 +329,7 @@  main(int argc, char *argv[])
 	/* initialize all ports */
 	RTE_ETH_FOREACH_DEV(portid)
 		if (port_init(portid, mbuf_pool) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16"\n",
 					portid);
 
 	if (rte_lcore_count() > 1)