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 D0876A056D; Mon, 21 Nov 2022 23:04:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FADE42D31; Mon, 21 Nov 2022 23:04:03 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mails.dpdk.org (Postfix) with ESMTP id 8D52440DF6 for ; Mon, 21 Nov 2022 23:04:02 +0100 (CET) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E3C8C612E9; Mon, 21 Nov 2022 22:04:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 052F9C433D6; Mon, 21 Nov 2022 22:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669068241; bh=e37+sQ79edjzG02/x+R/16zqYCYCyJ/O7vj5/1Mw/78=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=BvqtPPQvr86hR0WJKtKYC/vAu/9WgiWERDZOh6LHukzR6kcBa3ABJBA9tKBJC+ahI 2PFG9U8LCWS2vaAKaw+9Demk9mwdPIcw5UaUf+jHrQcA4Q5/7GO/dnXG3TwLl+QlUm 848BUZvZWGHh41cD891WYENijZhrutZuiMUg6Qq2Bai+XAq9OvX+06mN9Qv2WAJf/O ywfwCcCSp7tJF7FZyFD9VcGdO3pSSRgijtebocihVD/X16tlPoc/PACSG7bueO/KLN +aCNk9m6pZEGoqijWoLoXmA9MGCtXn4u6NyRLHEMHc1LuP5gZ+2U3hEr7glrU++ksm iI/brbEuUeGFA== Message-ID: <0f1222b5e03b5c7a396f60954686c1b569ed50f9.camel@kernel.org> Subject: Re: [PATCH 02/11] net/tap: check if name is null From: Sinan Kaya To: Thomas Monjalon Cc: dev@dpdk.org Date: Mon, 21 Nov 2022 17:03:59 -0500 In-Reply-To: <9023252.CDJkKcVGEf@thomas> References: <20221121204015.1135573-1-okaya@kernel.org> <20221121204015.1135573-3-okaya@kernel.org> <9023252.CDJkKcVGEf@thomas> Content-Type: multipart/alternative; boundary="=-pWU0t+I22kEW8eO1M2qm" User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 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 --=-pWU0t+I22kEW8eO1M2qm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Mon, 2022-11-21 at 22:41 +0100, Thomas Monjalon wrote: > 21/11/2022 21:40, okaya@kernel.org: > > --- a/drivers/net/tap/rte_eth_tap.c+++ > > b/drivers/net/tap/rte_eth_tap.c@@ -2340,6 +2340,10 @@ > > rte_pmd_tun_probe(struct rte_vdev_device *dev) struct > > rte_eth_dev *eth_dev; name = rte_vdev_device_name(dev);+ if > > (!name) { > > Please it is preferred to check against NULL,because name is not a > boolean, thanks.I know it's longer but it is more explicit. Sure, I can do that. Getting used to dpdk coding style. I wasn't sure what to do with braces on single line too. At least, I got a warning on that too. > Thanks for the fixes in this series. > Cheers --=-pWU0t+I22kEW8eO1M2qm Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
On Mon, 2022-11-21 at 22:41 +0100, Thomas Monjalon wrote:
21/11/2022 21:40, 
okaya@kernel.org
:
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/=
tap/rte_eth_tap.c
@@ -2340,6 +2340,10 @@ rte_pmd_tun_probe(struct=
 rte_vdev_device *dev)
 	struct rte_eth_dev *eth_dev;
 =
 	name =3D rte_vdev_device_name(dev);
+	if (!name) {

Please it is preferred to check agains=
t NULL,
because name is not a boolean, thanks.
I know i=
t's longer but it is more explicit.

S= ure, I can do that. Getting used to dpdk coding style. I wasn't sure
<= div>what to do with braces on single line too. At least, I got a warning on=
that too.

Thanks for the fixes in this series.

=


Cheers
--=-pWU0t+I22kEW8eO1M2qm--