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 A74A245CFB; Thu, 14 Nov 2024 01:37:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E353340BA2; Thu, 14 Nov 2024 01:37:03 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id D68824025F for ; Thu, 14 Nov 2024 01:37:00 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7ea7e250c54so9218a12.0 for ; Wed, 13 Nov 2024 16:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731544620; x=1732149420; 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=Tdp+5r4n9aIFjPALMSdA8LbEaYEr6BXw7S0rXOUjY44=; b=iqjUJQGqsEkRTRXUm9II7eACs+9cJqvO0kXZMcZER3Ea2On5YbqdrpJY7qMQJ13jhx QiMpo6iLKR6Lekdtczehn0EtZO+rAjz/6xY1/1+P7+Bb2zeE6CV8faU0eDTYvriZKIbf 3JBYo126YkTSsNLwnFL59SjV2wPdXk7IronWeRy9ugUn2wMUnrXLOZOMd3QXp1jZgyIM KPBzlu9ZpKvRC9vnc616OZ3qyO4OyNmfddypNTs48ABX86fMTvyz+I2d65OZiVZZpI/v lxs+ngQBzSiXarM3BQiGLXo3rpvVcCH1WHvNOZeEx7WVNaiO9IRGn9y6lSPDZqu8uG6g vQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731544620; x=1732149420; 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=Tdp+5r4n9aIFjPALMSdA8LbEaYEr6BXw7S0rXOUjY44=; b=XxpX+SAjuDYFICdeSFHhxJpbqh5j+PgLexnmEkRKnE0HEHK0FM/j83Uwxm3cwXMmHZ VLq6hNvqi5So/UIfnIDQFfaqSjVQBUhDovv0AMKANH+NT1L3I/S8QYIGI0wq/078tFkm t6TycMbP23XWg4RyWgzo2MSr3L0dmP1XKzcvoUuRFMh/qpFxsFtG4vPe3+zrd2PSwKhT EWsszJZhvhqlW8et1XOjA7CghbXJHgJL4YE6zUL/Lni+xO/zWELuKocpEEMn5s1R3lhw GanLV/DN8qOHCMgzONstr+3DWvFbMoZG3jRxuCnftD267qEdyCq0vO6pEP6XGvD2pp3U rxtw== X-Gm-Message-State: AOJu0YzJ2KWE5J1kVn+LPteimr6LWQ4o8OqrZfwKFDPwLTC2LgRAYhEY WrKMJVX2FRMwGJP3OW9DAK+yXtD6hMdEO8wTZh5BSlTk3/+og+5T+f42SV1i3G9RNv1cEXdYoXh T X-Google-Smtp-Source: AGHT+IEuSyJPatd32LpOWz25l/qq2zn7fUd1OjRkaEwamGW3PZfOYPTq7VDz6hWFlDhf8PwYFM/68Q== X-Received: by 2002:a05:6a20:734d:b0:1db:e0e5:9109 with SMTP id adf61e73a8af0-1dc832a2eaamr656815637.4.1731544619852; Wed, 13 Nov 2024 16:36:59 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea024bdb0csm146886a91.39.2024.11.13.16.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 16:36:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , qiming.yang@intel.com, Nir Efrati , Qi Zhang Subject: [PATCH 1/2] net/e1000: fix incorrect fallthrough in switch Date: Wed, 13 Nov 2024 16:36:13 -0800 Message-ID: <20241114003648.331795-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114003648.331795-1-stephen@networkplumber.org> References: <20241114003648.331795-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 --- 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 */ 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); } - 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