patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	John McNamara <john.mcnamara@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] examples/rxtx_callbacks: fix port ID format specifier
Date: Wed, 5 May 2021 19:54:05 -0700	[thread overview]
Message-ID: <20210505195405.2d0a57d6@hermes.local> (raw)
In-Reply-To: <20210505215133.21818-1-dmitry.kozliuk@gmail.com>

On Thu,  6 May 2021 00:51:33 +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>
> ---
> v2: use PRIx16 instead of %u and a cast (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..ecc2da2d8c 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 %"PRIx16"\n",
>  					portid);
>  
>  	if (rte_lcore_count() > 1)

NAK

Just use %u  it works for uint16. Don't start using hex, no other places in
DPDK print port number in hex. 

      parent reply	other threads:[~2021-05-06  2:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02  2:56 [dpdk-stable] [PATCH] " Dmitry Kozlyuk
2021-05-04  0:11 ` [dpdk-stable] [dpdk-dev] " Tyler Retzlaff
2021-05-04  6:48   ` Dmitry Kozlyuk
2021-05-05 16:00     ` Tyler Retzlaff
2021-05-05 21:39       ` Thomas Monjalon
2021-05-05 22:45         ` Tyler Retzlaff
2021-05-05 23:13           ` Thomas Monjalon
2021-05-11 22:34             ` Tyler Retzlaff
2021-05-11 23:35               ` Thomas Monjalon
2021-05-05 21:51 ` [dpdk-stable] [PATCH v2] " Dmitry Kozlyuk
2021-05-05 21:54   ` [dpdk-stable] [PATCH v3] " Dmitry Kozlyuk
2021-05-06  2:56     ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2021-05-12 19:37       ` Thomas Monjalon
2021-05-06  2:54   ` Stephen Hemminger [this message]

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=20210505195405.2d0a57d6@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=john.mcnamara@intel.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stable@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).