From patchwork Fri Mar 19 21:17:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 405268 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F86FC433E3 for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E66736197F for ; Fri, 19 Mar 2021 21:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbhCSVQe (ORCPT ); Fri, 19 Mar 2021 17:16:34 -0400 Received: from mga18.intel.com ([134.134.136.126]:20600 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbhCSVP6 (ORCPT ); Fri, 19 Mar 2021 17:15:58 -0400 IronPort-SDR: Vqu0a7OCa8i0LCNuRp/+EbG8I1t8MyRWhsyU8pTYvf83Qkc30896zoh0kIPVm6vBw84ErZBTLZ b6gTv/v57Mvg== X-IronPort-AV: E=McAfee;i="6000,8403,9928"; a="177554725" X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="177554725" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2021 14:15:57 -0700 IronPort-SDR: OolmT+97s+Z95jKWXrRwvOwO+8eqXSAgUf/Tb6VHsP9CGWXRApo0Fxic4Va7DyEZUgKf2JfYFF gqsRbXH0bUiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="451005070" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2021 14:15:57 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, vitaly.lifshits@intel.com, Dvora Fuxbrumer Subject: [PATCH net-next 1/5] igc: Remove unused MII_CR_RESET Date: Fri, 19 Mar 2021 14:17:19 -0700 Message-Id: <20210319211723.1488244-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> References: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sasha Neftin MII_CR_RESET mask not in use in i225 device and can be removed Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index b909f00a79e6..ca460bf1af2f 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -442,7 +442,6 @@ #define MII_CR_POWER_DOWN 0x0800 /* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ #define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ -#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */ #define MII_CR_SPEED_1000 0x0040 #define MII_CR_SPEED_100 0x2000 #define MII_CR_SPEED_10 0x0000 From patchwork Fri Mar 19 21:17:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 405267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C248C433E2 for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CBF3B61928 for ; Fri, 19 Mar 2021 21:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230229AbhCSVQc (ORCPT ); Fri, 19 Mar 2021 17:16:32 -0400 Received: from mga18.intel.com ([134.134.136.126]:20600 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbhCSVP6 (ORCPT ); Fri, 19 Mar 2021 17:15:58 -0400 IronPort-SDR: PK37qsOxT9fo04Dg5jS6aiLj+T2IjIcH9++CA8g1uSduE869ERVOKGHF8ox22JSX7ct5w3RvuL 4RsZBK+RBMcg== X-IronPort-AV: E=McAfee;i="6000,8403,9928"; a="177554726" X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="177554726" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2021 14:15:57 -0700 IronPort-SDR: qpV7AVrYiRFToVjZJTCPg6orHFV9t4uDpRp0S2fT1ALSa8szZ629myzsfz1RADXEVS4yRz3FbT 9YVFCiczQgTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="451005072" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2021 14:15:57 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, vitaly.lifshits@intel.com, Dvora Fuxbrumer Subject: [PATCH net-next 2/5] igc: Remove unused MII_CR_SPEED Date: Fri, 19 Mar 2021 14:17:20 -0700 Message-Id: <20210319211723.1488244-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> References: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sasha Neftin Force PHY speed not supported for i225 devices. MII_CR_SPEED masks not in use in i225 device and can be removed. Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index ca460bf1af2f..59043c3c5657 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -442,9 +442,6 @@ #define MII_CR_POWER_DOWN 0x0800 /* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ #define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ -#define MII_CR_SPEED_1000 0x0040 -#define MII_CR_SPEED_100 0x2000 -#define MII_CR_SPEED_10 0x0000 /* PHY Status Register */ #define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */ From patchwork Fri Mar 19 21:17:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 405266 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A5F6C433E5 for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E67E6197E for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230384AbhCSVQe (ORCPT ); Fri, 19 Mar 2021 17:16:34 -0400 Received: from mga18.intel.com ([134.134.136.126]:20604 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhCSVP7 (ORCPT ); Fri, 19 Mar 2021 17:15:59 -0400 IronPort-SDR: foSwQeOD/Gf9r0ONjskosGVLvuqLDA8QX/hNYe0W7cYxTZZtg8EyV57sxEQKdZ7XeaR0JcDqyM osVg80tbXIdQ== X-IronPort-AV: E=McAfee;i="6000,8403,9928"; a="177554727" X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="177554727" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2021 14:15:57 -0700 IronPort-SDR: k31xIxjsg1VDhmbLjjhU758Gu0YQPaUb8/HDo/PfbOSzfsAcadHyKqPaaxRqnb3qv5jbMCFQWC y3PirUtxs2Xw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="451005076" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2021 14:15:57 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Sasha Neftin , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, vitaly.lifshits@intel.com, Dvora Fuxbrumer Subject: [PATCH net-next 3/5] igc: Remove unused MII_CR_LOOPBACK Date: Fri, 19 Mar 2021 14:17:21 -0700 Message-Id: <20210319211723.1488244-4-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> References: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sasha Neftin MII_CR_LOOPBACK masks not in use in i225 device and can be removed. Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h index 59043c3c5657..35ed997af075 100644 --- a/drivers/net/ethernet/intel/igc/igc_defines.h +++ b/drivers/net/ethernet/intel/igc/igc_defines.h @@ -441,7 +441,6 @@ #define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */ #define MII_CR_POWER_DOWN 0x0800 /* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ -#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ /* PHY Status Register */ #define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */ From patchwork Fri Mar 19 21:17:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 405814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD833C433C1 for ; Fri, 19 Mar 2021 21:17:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D2C261928 for ; Fri, 19 Mar 2021 21:17:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbhCSVQb (ORCPT ); Fri, 19 Mar 2021 17:16:31 -0400 Received: from mga18.intel.com ([134.134.136.126]:20600 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230092AbhCSVP6 (ORCPT ); Fri, 19 Mar 2021 17:15:58 -0400 IronPort-SDR: +9kGVGj47+efK+Byqst+ybTlZdTobAGMPzDEhsbIkHJD76FJrRbyZdP42egkdGznCjZkQzGFej kOPisdlzz6/w== X-IronPort-AV: E=McAfee;i="6000,8403,9928"; a="177554728" X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="177554728" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2021 14:15:57 -0700 IronPort-SDR: tFC2nHgQlGPEEDo5BBcAJDh4RyOBFQjgR6vhyJ6jHkLac/hoLZmAosfYXZ2Jd0Xazz5kGFiJUW xnJxIIL0GD0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="451005078" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2021 14:15:57 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Jiapeng Zhong , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, sasha.neftin@intel.com, vitaly.lifshits@intel.com, Abaci Robot , Dvora Fuxbrumer Subject: [PATCH net-next 4/5] igc: Assign boolean values to a bool variable Date: Fri, 19 Mar 2021 14:17:22 -0700 Message-Id: <20210319211723.1488244-5-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> References: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jiapeng Zhong Fix the following coccicheck warnings: ./drivers/net/ethernet/intel/igc/igc_main.c:4961:2-14: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4955:2-14: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4933:1-13: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4592:1-24: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4438:2-25: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4396:2-25: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4018:2-25: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 059ffcfb0bda..a476837eafca 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -3580,7 +3580,7 @@ void igc_up(struct igc_adapter *adapter) netif_tx_start_all_queues(adapter->netdev); /* start the watchdog. */ - hw->mac.get_link_status = 1; + hw->mac.get_link_status = true; schedule_work(&adapter->watchdog_task); } @@ -4000,7 +4000,7 @@ static irqreturn_t igc_msix_other(int irq, void *data) } if (icr & IGC_ICR_LSC) { - hw->mac.get_link_status = 1; + hw->mac.get_link_status = true; /* guard against interrupt when we're going down */ if (!test_bit(__IGC_DOWN, &adapter->state)) mod_timer(&adapter->watchdog_timer, jiffies + 1); @@ -4378,7 +4378,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data) } if (icr & (IGC_ICR_RXSEQ | IGC_ICR_LSC)) { - hw->mac.get_link_status = 1; + hw->mac.get_link_status = true; if (!test_bit(__IGC_DOWN, &adapter->state)) mod_timer(&adapter->watchdog_timer, jiffies + 1); } @@ -4420,7 +4420,7 @@ static irqreturn_t igc_intr(int irq, void *data) } if (icr & (IGC_ICR_RXSEQ | IGC_ICR_LSC)) { - hw->mac.get_link_status = 1; + hw->mac.get_link_status = true; /* guard against interrupt when we're going down */ if (!test_bit(__IGC_DOWN, &adapter->state)) mod_timer(&adapter->watchdog_timer, jiffies + 1); @@ -4574,7 +4574,7 @@ static int __igc_open(struct net_device *netdev, bool resuming) netif_tx_start_all_queues(netdev); /* start the watchdog. */ - hw->mac.get_link_status = 1; + hw->mac.get_link_status = true; schedule_work(&adapter->watchdog_task); return IGC_SUCCESS; @@ -4915,7 +4915,7 @@ int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx) { struct igc_mac_info *mac = &adapter->hw.mac; - mac->autoneg = 0; + mac->autoneg = false; /* Make sure dplx is at most 1 bit and lsb of speed is not set * for the switch() below to work @@ -4937,13 +4937,13 @@ int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx) mac->forced_speed_duplex = ADVERTISE_100_FULL; break; case SPEED_1000 + DUPLEX_FULL: - mac->autoneg = 1; + mac->autoneg = true; adapter->hw.phy.autoneg_advertised = ADVERTISE_1000_FULL; break; case SPEED_1000 + DUPLEX_HALF: /* not supported */ goto err_inval; case SPEED_2500 + DUPLEX_FULL: - mac->autoneg = 1; + mac->autoneg = true; adapter->hw.phy.autoneg_advertised = ADVERTISE_2500_FULL; break; case SPEED_2500 + DUPLEX_HALF: /* not supported */ From patchwork Fri Mar 19 21:17:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 405812 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F59C433E4 for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 076FE601FA for ; Fri, 19 Mar 2021 21:17:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230409AbhCSVQf (ORCPT ); Fri, 19 Mar 2021 17:16:35 -0400 Received: from mga18.intel.com ([134.134.136.126]:20600 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbhCSVP7 (ORCPT ); Fri, 19 Mar 2021 17:15:59 -0400 IronPort-SDR: ohSPZ2ALF+UjEIuuyH88wo4rkMXfyg1C1d/9n4JPEaQbEQlSz1ZmjOCaVo5OWTzv6uA6/8AIlf QhV7DrTvHAig== X-IronPort-AV: E=McAfee;i="6000,8403,9928"; a="177554729" X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="177554729" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Mar 2021 14:15:57 -0700 IronPort-SDR: r0DBg6mo8oG5VrVhyBJXNa+SRE4yvlwy2dxMmdijZL6ysG2LX3p1w5bUnKV24pVOaiaUKr2KOb Lag9KOKv4jiw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,262,1610438400"; d="scan'208";a="451005080" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 19 Mar 2021 14:15:57 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Wei Yongjun , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, sasha.neftin@intel.com, vitaly.lifshits@intel.com, yu.c.chen@intel.com, Hulk Robot Subject: [PATCH net-next 5/5] e1000e: Mark e1000e_pm_prepare() as __maybe_unused Date: Fri, 19 Mar 2021 14:17:23 -0700 Message-Id: <20210319211723.1488244-6-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> References: <20210319211723.1488244-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Wei Yongjun The function e1000e_pm_prepare() may have no callers depending on configuration, so it must be marked __maybe_unused to avoid harmless warning: drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function] 6926 | static int e1000e_pm_prepare(struct device *dev) | ^~~~~~~~~~~~~~~~~ Fixes: ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 480f6712a3b6..39ca02b7fdc5 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6919,7 +6919,7 @@ static int __e1000_resume(struct pci_dev *pdev) return 0; } -static int e1000e_pm_prepare(struct device *dev) +static __maybe_unused int e1000e_pm_prepare(struct device *dev) { return pm_runtime_suspended(dev) && pm_suspend_via_firmware();