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 3F8EC45D03; Thu, 14 Nov 2024 10:03:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B75A427A5; Thu, 14 Nov 2024 10:03:58 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 9DFDE4026F for ; Thu, 14 Nov 2024 10:03:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731575037; x=1763111037; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=MtcCCMhU3rlH8KAHg+yU8MBj2I3yZqMOjZd+sAMYkbM=; b=Uk7eHlQwH+VY92hBLeV/oh5CoUs6wAnOTOgXjLGI0GkV0hPuhFdpf5b1 QALNMorjy+q1Xn5iNdDJO66QtIziman0nIsj6Ap4DgfnNl58dWM2/elTn 1pUE71UJLs70fmBiw7hC6dSRbUlajF25C+mngHR9wvDS/svh/pLgAolaW fsNaIifZC15UrqzE5S3XVAqsdm4bR/hXmszmtMDtHI9ebF970eeiF2o70 bruTO2xvF6e9xmDQ6s38xw9uM+R472A2Qg/bWzy2vUSNGmvd5VjNaau4e Ypb23Njq6x9GpGSqCWOFe0d+fGOMuAUJhq7oASXVp7KVmiKNdoRT1AQ9t w==; X-CSE-ConnectionGUID: TAANsQUJS9ul+7s/C2MS0g== X-CSE-MsgGUID: +fy6cJpMSAqEQtNPZIco6A== X-IronPort-AV: E=McAfee;i="6700,10204,11255"; a="49018142" X-IronPort-AV: E=Sophos;i="6.12,153,1728975600"; d="scan'208";a="49018142" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2024 01:03:49 -0800 X-CSE-ConnectionGUID: 56ArZXlZTWSRjZI/ExKJ4w== X-CSE-MsgGUID: HQK0+AA7RauA7G4YAWwDEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,153,1728975600"; d="scan'208";a="111443881" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 14 Nov 2024 01:03:40 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 14 Nov 2024 01:03:34 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 14 Nov 2024 01:03:34 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 14 Nov 2024 01:03:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q/cyc2ewCpReXNUHLDDQBxlm1nmYz1pZewNvfdmV4fhkMgK538JrU1zuQ2WGbNk3eV7itA7Z6S0rjuoiEvG7cg9NttOdI2r84HTmhAYu3+Ws2FWN4/0Krl6QcAKOaj3rmST769nDSPRMPpscVoP7MMvlqD2gDRSzSMwoBpH06/JOGr0Q/Dxr29d/xbFjKCzkdxXEQ3g6Xeg7MA8FYTBI9hGp4efjH60JUkarwGhfJ4DOqmS9l5YBKCF8WDvtONKgN+FRV5ELXu/QqC3T/QdgFGDiBsWDPEeEO4Oco2CeUqezxxIoAy1xFbunUrbR1MKgWcVXlGayALoKzIn8+/tH0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fdXY1b7l3oKj41sws2WUk15aLbEAs/KB/aYZcpIlncI=; b=TxiGou4oDOiqt0drOIBIVKu6lJ2bEAxQZDzsQgXTEuUGudGIFmYd2J9qy1xChI2Mn12YswPtuidSnvHVITxxHBML7b8QMb/4WhUIChpsD0GeKEyU/UHNVL8XsvKv9kkcus2JS5dwIE097ElNBrdgOomGOcl5PH5/T1tthJc2p0NzJc8PAeR3JY+04sOaCkF1F81EJMfDQPy2i+1fvVcyqQtXlRyE9n1S2nXOxbN90J5i1DoSfpluPvvr3UM2YAkzOYQrnMq6rCZmYwgyHdkg/e58NOQoo/cuHPDMUr7tFlclYGZjFqkVcD+REwyy2EOEAXTDlRV8pCUuQ18iASFO1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH0PR11MB5928.namprd11.prod.outlook.com (2603:10b6:510:144::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Thu, 14 Nov 2024 09:03:31 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%4]) with mapi id 15.20.8093.018; Thu, 14 Nov 2024 09:03:31 +0000 Date: Thu, 14 Nov 2024 09:03:25 +0000 From: Bruce Richardson To: Stephen Hemminger CC: , , Nir Efrati , Qi Zhang Subject: Re: [PATCH 1/2] net/e1000: fix incorrect fallthrough in switch Message-ID: References: <20241114003648.331795-1-stephen@networkplumber.org> <20241114003648.331795-2-stephen@networkplumber.org> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241114003648.331795-2-stephen@networkplumber.org> X-ClientProxiedBy: ZR0P278CA0084.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH0PR11MB5928:EE_ X-MS-Office365-Filtering-Correlation-Id: 230baf2e-2a58-4c1c-dc46-08dd048b366d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?TLhssQ5yi00AJbRvVEiM9ANdc/vp1ry+KuBi6uTf7AYB88nSzA2BfoPVAqt4?= =?us-ascii?Q?UyXO4B6DGi2S8KlyqH2V65IAm/ugq4tdXbu0ilXZBhKpB/obgBaCxTd/Hucx?= =?us-ascii?Q?OzHMRbodaEP+ANuq8zBP3ZNc4ktJ3mBtLwHyOGMFtq89iXXaWefnUkcesDmt?= =?us-ascii?Q?oZM1PUaa9/BzRybdWFgj6aiAkPD9jO9kq0tdPOEZbSbuLBvaXI6xDpnm/G9K?= =?us-ascii?Q?Ridp/8AEliPaNoxKd2To+Ux4fWFrprwtT+MRPU0DS32FZ/hoUww8kKNoxvjZ?= =?us-ascii?Q?9Y9O4TrztGrrmtJLYsuij6raSg6ZmkKxyKrF1wVH/FmP2HXrM+hmgEkwhpfm?= =?us-ascii?Q?CfrqsTcw38+pC0wi9873TwCZTDKjnHy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?Q?tbwnKupnzEcbYuIgepwv?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rqKpZsm5jd1mWO+bzom/W2NWdQXufXKIZeckXN7IWSlfl6lXdEwhQrxKXPy7?= =?us-ascii?Q?3z2arCoRdTJtt8ie0NswFOGbaAAYjiV2XgKnkC5z/8YWK9d0ouFlQprPRz/E?= =?us-ascii?Q?2uuwbAAe/o/4peRLCI9FB2BrSLaNJuaB/t0igR+D/wXLzqmu3/xosv8nwPNa?= =?us-ascii?Q?jWGhXQ8fcSZhIHSJprpaGy4FCYmTblA4rVtnuSJxnsniNIo4rOKLYzF7Gt/a?= =?us-ascii?Q?aUNzW6xWok5kcq2YYRLSUn01wy0MgR0lLmwwy+q9DRKajJofB49MFjZYczfv?= =?us-ascii?Q?1SzNyJZ+zKro8Rnj56F6+jsMcoEJzdgUn86H33WDOatBidBixU5CMsfAQo8X?= =?us-ascii?Q?LrAf0lojmh8XgzD+aKNaf90aign/XlGC/dlWS0ZnQSQ40e4xJhF6I1MXKWxg?= =?us-ascii?Q?muapaj+yl8CgSX8vosTq5D3ZrbtN/4y7ObS1c7TtAyE3j/zk7Zzn9udx5otq?= =?us-ascii?Q?MEQ1XxcT/Qfg5SBXeD6D/R90IrtRC9KcHKQreXdMcXP+J71R6M7AR6Qh+U7d?= =?us-ascii?Q?VTewUTX6r9k+T1nj060Ram3z6vZY8U3L18MZqqTkRtXiWUonLfyewv5gTpf6?= =?us-ascii?Q?G7xjwyzs9rCP1YXHC3Dy3bFW2T9IwVoX8ZBHDSVrBfk+qld5ohbpAm18wruv?= =?us-ascii?Q?GrmxuLrdnr5uUBfYc5Y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P?= =?us-ascii?Q?r3PyYFJfq6ZeP9mrV/pRLImNcZ3S7vqP5iJFei42uDL1E7qMgmMuyIpXAGY2?= =?us-ascii?Q?Aw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 230baf2e-2a58-4c1c-dc46-08dd048b366d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 09:03:31.7799 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mszVqMg0QkuD7Ghf2svttokYUd92CUurjXW+2qxvTMpwwkyjSsycqyxOTYF9ZqzqH2q7csZz8N8pAeYpbvIzUd5OvbYO8J9DDbFaQpC7qPk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5928 X-OriginatorOrg: intel.com 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, Nov 13, 2024 at 04:36:13PM -0800, Stephen Hemminger wrote: > There is an incorrect fallthrough identified by PVS studio. > Even though this is in base code it should be fixed, and > the warning should be re-enabled to prevent future bugs. > > Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ > > Fixes: f2553cb9eba6 ("net/e1000/base: add new I219 devices") > Cc: qiming.yang@intel.com > > Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson Thanks. Two minor comments below. > --- > drivers/net/e1000/base/e1000_82575.c | 3 +-- > drivers/net/e1000/base/e1000_api.c | 2 +- > drivers/net/e1000/base/meson.build | 1 - > 3 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c > index 7c78649393..bcc695e8a1 100644 > --- a/drivers/net/e1000/base/e1000_82575.c > +++ b/drivers/net/e1000/base/e1000_82575.c > @@ -1721,7 +1721,7 @@ STATIC s32 e1000_get_media_type_82575(struct e1000_hw *hw) > dev_spec->sgmii_active = true; > break; > } > - /* Fall through for I2C based SGMII */ > + /* fallthrough */ Can we keep the old comment as well as the new? > case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES: > /* read media type from SFP EEPROM */ > ret_val = e1000_set_sfp_media_type_82575(hw); > @@ -3585,4 +3585,3 @@ void e1000_i2c_bus_clear(struct e1000_hw *hw) > /* Put the i2c bus back to default state */ > e1000_i2c_stop(hw); > } > - Unrelated whitespace change, and also below. No big deal though. > diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c > index 0f6e5afa3b..61b3ead469 100644 > --- a/drivers/net/e1000/base/e1000_api.c > +++ b/drivers/net/e1000/base/e1000_api.c > @@ -295,6 +295,7 @@ s32 e1000_set_mac_type(struct e1000_hw *hw) > case E1000_DEV_ID_PCH_RPL_I219_LM23: > case E1000_DEV_ID_PCH_RPL_I219_V23: > mac->type = e1000_pch_tgp; > + break; > case E1000_DEV_ID_PCH_ADL_I219_LM17: > case E1000_DEV_ID_PCH_ADL_I219_V17: > case E1000_DEV_ID_PCH_RPL_I219_LM22: > @@ -1368,4 +1369,3 @@ void e1000_shutdown_fiber_serdes_link(struct e1000_hw *hw) > if (hw->mac.ops.shutdown_serdes) > hw->mac.ops.shutdown_serdes(hw); > } > - > diff --git a/drivers/net/e1000/base/meson.build b/drivers/net/e1000/base/meson.build > index 6d6048488f..e73f3d6d55 100644 > --- a/drivers/net/e1000/base/meson.build > +++ b/drivers/net/e1000/base/meson.build > @@ -24,7 +24,6 @@ sources = [ > > error_cflags = [ > '-Wno-unused-parameter', > - '-Wno-implicit-fallthrough', > ] > c_args = cflags > foreach flag: error_cflags > -- > 2.45.2 >