From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2B1C9A0679 for ; Thu, 28 Mar 2019 12:04:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 24FED1B146; Thu, 28 Mar 2019 12:04:47 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 671401B11C for ; Thu, 28 Mar 2019 12:04:46 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 626DF89C33; Thu, 28 Mar 2019 11:04:44 +0000 (UTC) Received: from [10.36.112.59] (ovpn-112-59.ams2.redhat.com [10.36.112.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5046A5D73F; Thu, 28 Mar 2019 11:04:41 +0000 (UTC) To: Stephen Hemminger , tiwei.bie@intel.com, zhihong.wang@intel.com Cc: dev@dpdk.org References: <20190327210843.13813-1-stephen@networkplumber.org> <20190327210843.13813-3-stephen@networkplumber.org> From: Maxime Coquelin Message-ID: <24a20bda-5c84-21df-53b5-7c1a811a9eb0@redhat.com> Date: Thu, 28 Mar 2019 12:04:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190327210843.13813-3-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 28 Mar 2019 11:04:45 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Message-ID: <20190328110437.phe1C-4n2s-Y5lu60vRpra0J2vZMsFcI_6Vz2eT6VZY@z> On 3/27/19 10:08 PM, Stephen Hemminger wrote: > Since previous test is for mtu < 1519 the next else if > is always true. This causes the lgtm static tool to complain. > Not a real issue, just cosmetic. > > Signed-off-by: Stephen Hemminger > --- > drivers/net/virtio/virtio_rxtx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c > index 5f6796bdba37..268fe3b8f156 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -1110,7 +1110,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf) > stats->size_bins[0]++; > else if (s < 1519) > stats->size_bins[6]++; > - else if (s >= 1519) > + else > stats->size_bins[7]++; > } > > Reviewed-by: Maxime Coquelin