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 313FA42D8D; Thu, 29 Jun 2023 17:51:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACB5840EDB; Thu, 29 Jun 2023 17:51:39 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 99471406B7 for ; Thu, 29 Jun 2023 17:51:37 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id D5A362083962; Thu, 29 Jun 2023 08:51:36 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D5A362083962 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1688053896; bh=9KtZTNhBSiIUBSW28dmr0JyfymKhs349Vl+eIanVIV8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FAexDqb/JwsHsniWgpst6SG6NXf2aNjX0DjOLasE+AE7qDympW2QOLtAHkiT+MdD0 ZQCSkWx6J2DdrtjSdkIskimpfWVbKLJCotIWfVgFdFlXcu0p+CwgLvTcZ+oB/jiK8G yw9No78/dK9Gs6c/NPVPdoHHXKt5Cowe8dHWDTRU= Date: Thu, 29 Jun 2023 08:51:36 -0700 From: Tyler Retzlaff To: longli@microsoft.com Cc: Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org, stable.dpdk.org@linux.microsoft.com, Stephen Hemminger Subject: Re: [PATCH] net/netvsc: fix bogus sizeof calculation Message-ID: <20230629155136.GB5702@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1687998597-11972-1-git-send-email-longli@linuxonhyperv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1687998597-11972-1-git-send-email-longli@linuxonhyperv.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Wed, Jun 28, 2023 at 05:29:57PM -0700, longli@linuxonhyperv.com wrote: > From: Stephen Hemminger > > Found by cppcheck. > > drivers/net/netvsc/hn_rndis.c:332:21: warning: Found calculation inside sizeof(). [sizeofCalculation] if (len < sizeof(3 * sizeof(uint32_t))) { > > Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") > Signed-off-by: Stephen Hemminger > Signed-off-by: Long Li > --- Acked-by: Tyler Retzlaff