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 EB6D745D07; Thu, 14 Nov 2024 18:14:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59A5442EDA; Thu, 14 Nov 2024 18:13:57 +0100 (CET) Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mails.dpdk.org (Postfix) with ESMTP id BC6FF42EB4 for ; Thu, 14 Nov 2024 18:13:54 +0100 (CET) Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-20cceb8d8b4so5701815ad.1 for ; Thu, 14 Nov 2024 09:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731604434; x=1732209234; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eoq1DXKb42si3PfP/posG+K/X+s8r49JVhsOk0+UQ60=; b=oeu5TWe6Yeej6ePM3VAUvKrYQPKbstJEhrACk1gM50ePHCHAjUYoPv+o1fC5kgBkaF ZxuoPIbRix5U+csNM4s+5P0b7E/RY6f8j+UddnxXZBi0+8SC4FJLrQFDRxw2RzagMxJW ahsAO3qSmKTYDifh8HXpWyHrwUWQ8rnw5Tt696Wbm+VS7Vxs2NE3BgzxronINXIqUlcb 62JowoFgN1fl8i4AZVgCubz5ejREM4sA1TJfdoI8WKRBtzK0xmuERITi4ZKa582SGqvW lLPHll3A31bBpGr3v83YyJWeoTEGhgBmcXlfQNJtvAIIW0lzMuMxBtxQ9LAjovZpo7q1 X9Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731604434; x=1732209234; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eoq1DXKb42si3PfP/posG+K/X+s8r49JVhsOk0+UQ60=; b=QNH71Z0oWaPygA4UDXZahcBkf30fBbyan1nIRBaUcygNrkkBLUZL7oCCq7fEfdibri OPhmiE1adwXkJZOPQ0ZMI+bKbUh8Vibnb8NtsWVwMHoZKaoZHATjoVdFLlO+w6yCR0t6 10CGNayO2Rr4uEyUZ5gY7q7tmIvHzo3MICoJoeFfK2n1O+XVD5yWdQPnTgaSWEUeKrrZ QblySsqCsQ7RixzbJoDO9EkGJvQ9X+Wps6nZsFxIEzmf6LTM95zAakKv0TdhOTvyPJx9 t53OY2nPOK2Hs66/3k1SGw/XOwyqkw3lRMO5TU2z0BHzhTKgxGwiQiBhHeLSX4j/onM8 shnA== X-Gm-Message-State: AOJu0YwOnuP9Af0xcab8gHHJQUtWL8eo10kILCgeEVUCumMRPxhlvbPi brkGsTcxi36wlQVqRGqpVqqG07wpSnyqdTj6ueJxK1h6xnHUjgi9Wr5y9rxAOBGzjnShYieWuGg FI08= X-Google-Smtp-Source: AGHT+IFW8QDMuxCFSbVE92MGA26Bxd+Pptxmpge3Ghq2ik3w3GK5ptlP5pAJ7b7HrlmrZ2IJLN7I/w== X-Received: by 2002:a17:902:d4d0:b0:20c:da9a:d5a8 with SMTP id d9443c01a7336-211c0f1eed6mr53407825ad.9.1731604433919; Thu, 14 Nov 2024 09:13:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211c7d1ee20sm13047865ad.216.2024.11.14.09.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 09:13:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , qiming.yang@intel.com, Bruce Richardson , Qi Zhang , Nir Efrati Subject: [PATCH v2 2/2] net/e1000: fix incorrect fallthrough in switch Date: Thu, 14 Nov 2024 09:11:55 -0800 Message-ID: <20241114171342.19767-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114171342.19767-1-stephen@networkplumber.org> References: <20241114003648.331795-1-stephen@networkplumber.org> <20241114171342.19767-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- drivers/net/e1000/base/e1000_82575.c | 2 +- drivers/net/e1000/base/e1000_api.c | 2 +- drivers/net/e1000/base/meson.build | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c index 7c78649393..ccc7aeab21 100644 --- a/drivers/net/e1000/base/e1000_82575.c +++ b/drivers/net/e1000/base/e1000_82575.c @@ -1722,6 +1722,7 @@ STATIC s32 e1000_get_media_type_82575(struct e1000_hw *hw) break; } /* Fall through for I2C based SGMII */ + /* Fall through */ 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 +3586,3 @@ void e1000_i2c_bus_clear(struct e1000_hw *hw) /* Put the i2c bus back to default state */ e1000_i2c_stop(hw); } - 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