patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: stable@dpdk.org, dev@dpdk.org,
	Bruce Richardson <bruce.richardson@intel.com>,
	John McNamara <john.mcnamara@intel.com>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/rxtx_callbacks: fix port ID format specifier
Date: Wed, 05 May 2021 23:39:23 +0200
Message-ID: <10660804.QYKOPib57F@thomas> (raw)
In-Reply-To: <20210505160042.GB13051@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>

05/05/2021 18:00, Tyler Retzlaff:
> On Tue, May 04, 2021 at 09:48:22AM +0300, Dmitry Kozlyuk wrote:
> > 2021-05-03 17:11 (UTC-0700), Tyler Retzlaff:
> > > On Sun, May 02, 2021 at 05:56:56AM +0300, Dmitry Kozlyuk wrote:
> > > > Use "%u" and a cast as in other places when port ID is formatted.
> > > > 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>
[...]
> > > > -			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
> > > > -					portid);  
> > > 
> > > how come not just `% " PRIu16 "\n"' ?
> > > 
> > > what was the -Wformat clang on windows complaint?
> > 
> > PRIx16 would work, but I noticed that in other places where port ID is
> > printed, the pattern above is used. IMO uniform approach is better.
> 
> ah, consistency. yes i'll have some of that. maybe one day in the future
> we can change them all in one shot, but not today.
> 
> Acked-By: Tyler Retzlaff <roretzla@linux.microsoft.com>

I think PRIu16 is more appropriate.
Consistency doesn't matter if an approach is better.





  reply	other threads:[~2021-05-05 21:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02  2:56 [dpdk-stable] " 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 [this message]
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   ` [dpdk-stable] [dpdk-dev] [PATCH v2] " Stephen Hemminger

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=10660804.QYKOPib57F@thomas \
    --to=thomas@monjalon.net \
    --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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git