From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F03F1A052A; Tue, 26 Jan 2021 23:41:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9B2A9140D03; Tue, 26 Jan 2021 23:41:27 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 2DDE6140D02 for ; Tue, 26 Jan 2021 23:41:26 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 7D3787AE; Tue, 26 Jan 2021 17:41:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 26 Jan 2021 17:41:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm3; bh= U5aw+Vk96ZqvRWTGV7NCzrlmq0jksLRBb1WWK5wsCK4=; b=YAMuzcqVu9IMbnBO CNkEWw9+ZdpXkVAESJuPQodDt4je9WLsjdAOePfUIyZ7LL+9+s4tNUWyQfU2+Mos XNdOxKKB/3iy+6g6SX+iEuZD+9bD5qt4xiT+tMbBzL25cFl79PZ56iQW/pMSBnds B+PJU8rt+EjZeC/MahnoEJLSzK3AJz1wzYA6faFhWN/Uin+5n3b6WSnefyCCicWq YuIr4ckFKoOSlK1tNL8B6GEz78OaK9eHX25P5VpdOLmTgS9Y0Lr07GXVgy6akQUK U9gFMAnnj08gwUmgA2NEhIyMeWSLds9eRNY3+Z8IMhCKgoLc0ejnT0sRlFwykBlM 8Cnjrw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=U5aw+Vk96ZqvRWTGV7NCzrlmq0jksLRBb1WWK5wsC K4=; b=OzHEUZB7rp0lpWTtVNYac+nyTZ6M7PA/5zL0/neRqVC1iG5wHWpsw1Iqz M2KnRyTREpWkxtibd1iI0ta1R1HEkk28CTZEx+spjtUcJaRxZp6Uzy9chkxYStkJ DbBHXGRc6CY2rwuIsozBvUin5SwvfnC0y+1bNv7uj4vBrtCzcOf0Pqmp3gQcRuVN WCQk8zEhaY3Hl5JrtnyB4kaoZv1Th6KMVWeFEXTqs3mrwhRYkHIEsPS4craUziGZ 0o9L1a1VbATpZzwKqH4+NwIja69YBmQ0dk34e3YApVlg+OBJhvo8/Id0MdnhHMNh +1ZJvdfWnW1grWWBuJJJkZxa/hRag== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejgddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 0D813240064; Tue, 26 Jan 2021 17:41:22 -0500 (EST) From: Thomas Monjalon To: Nick Connolly Cc: Tal Shnaiderman , "dmitry.kozliuk@gmail.com" , "pallavi.kadam@intel.com" , "dev@dpdk.org" Date: Tue, 26 Jan 2021 23:41:19 +0100 Message-ID: <2579832.PDEiC53ygB@thomas> In-Reply-To: References: <20210125170821.11306-1-nick.connolly@mayadata.io> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] bus/pci: nvme on Windows requires class id and bus X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.