DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Nick Connolly <nick.connolly@mayadata.io>
Cc: Tal Shnaiderman <talshn@nvidia.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"pallavi.kadam@intel.com" <pallavi.kadam@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus
Date: Tue, 26 Jan 2021 23:41:19 +0100
Message-ID: <2579832.PDEiC53ygB@thomas> (raw)
In-Reply-To: <ee5d1820-e490-6e63-abe7-a1cca2117212@mayadata.io>

26/01/2021 19:18, Nick Connolly:
> Hi Tal,
> 
> Thanks for the comments.
> 
> >> +       /* Try and find PCI class ID */
> >> +       for (cp = buf; !(cp[0] == 0 && cp[1] == 0); cp++)
> > How about
> > for (cp = buf; cp[0] || cp[1]; cp++)
> That would be my preferred idiom, but the DPDK coding style (1.9.1) says 
> 'do not use ! for tests unless it is a boolean' (but somewhat 
> confusingly does so in a section on NULL pointers).  I interpreted it as 
> a general prohibition on conditionals without an explicit operator 
> (except for booleans).  I'd love to be corrected here!

That's true. Comparisons should be explicit.





  reply	other threads:[~2021-01-26 22:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 17:08 Nick Connolly
2021-01-26 17:45 ` Tal Shnaiderman
2021-01-26 18:18   ` Nick Connolly
2021-01-26 22:41     ` Thomas Monjalon [this message]
2021-01-27 14:22       ` Nick Connolly
2021-01-27 15:13     ` Tal Shnaiderman
2021-01-28 17:00 ` [dpdk-dev] [PATCH v2] " Nick Connolly
2021-01-28 17:04 ` [dpdk-dev] [PATCH v3] " Nick Connolly
2021-01-31 15:56   ` Tal Shnaiderman
2021-02-02 13:07     ` Nick Connolly
2021-02-02 13:44 ` [dpdk-dev] [PATCH v4] " Nick Connolly
2021-02-02 13:54 ` [dpdk-dev] [PATCH v5] " Nick Connolly
2021-02-02 14:04   ` Tal Shnaiderman
2021-02-23 18:18 ` [dpdk-dev] [PATCH v6] " Nick Connolly
2021-02-28 14:38   ` Dmitry Kozlyuk
2021-03-01  9:24     ` Nick Connolly
2021-03-01  9:56 ` [dpdk-dev] [PATCH v7] " Nick Connolly
2021-03-16 13:45   ` Thomas Monjalon

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=2579832.PDEiC53ygB@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=nick.connolly@mayadata.io \
    --cc=pallavi.kadam@intel.com \
    --cc=talshn@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/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 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

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


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