Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 682CFC47073 for ; Thu, 4 Jan 2024 19:34:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 10D6E611C2; Thu, 4 Jan 2024 19:34:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 10D6E611C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1704396852; bh=XRsr08bgpJ/WzOBo9B43cbQdTTrzIqpon/GrRSTMCcM=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=haTjNPy8WVuh01KBPcByc0M/T9wR0u+Eu+NTO90pVh69t1RD1mMkD0u7p2a5VZi+f IuVY75cBhBZT+1ffgwouN2aPP1bMtM4w8krwIoyV4FASYipz24Z/oIx3J8JGD/MgK8 n5XK37G+IEYQ0h9Y4XM+9yXNhrGNQKxaF0xaEqIj0ZnC5sBuwtPQ6WraKPG3sf7yZ0 s74cjrZHFEPXeruJwVlj90pIrpmhCAZJGARxJP576kjsTJk+wOnoieB57omn1Xg1qn IIiTA323N2P3KZn6G1+zhzhlnwrErsJWzh5oK6POGV4VR96B8QkZFuJvcf+g/DQxZy pnNh+Y//g/uOw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QVkijRoRKNfA; Thu, 4 Jan 2024 19:34:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id D1F67611E2; Thu, 4 Jan 2024 19:34:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D1F67611E2 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1D5C61BF356 for ; Thu, 4 Jan 2024 19:34:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E9E5A41946 for ; Thu, 4 Jan 2024 19:34:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E9E5A41946 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V-ULpxKrvzrh for ; Thu, 4 Jan 2024 19:34:08 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3EF7E4192B for ; Thu, 4 Jan 2024 19:34:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3EF7E4192B X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="4452289" X-IronPort-AV: E=Sophos;i="6.04,331,1695711600"; d="scan'208";a="4452289" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 11:34:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="899406952" X-IronPort-AV: E=Sophos;i="6.04,331,1695711600"; d="scan'208";a="899406952" Received: from ccdlinuxdev11.iil.intel.com ([143.185.160.232]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 11:34:06 -0800 From: Vitaly Lifshits To: intel-wired-lan@lists.osuosl.org Date: Thu, 4 Jan 2024 21:34:02 +0200 Message-Id: <20240104193402.675593-1-vitaly.lifshits@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704396848; x=1735932848; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UUzhQ3j8XObhLCMlPDVBMSw5HQPFHzs4APJyk03NnTg=; b=n7aapUEOrTcOjvfySwyobgRW61efBawp7nlSaJ7JM0CBrNit/bTxzWMH NxUmBLIpnJ6vEpMyRoDtDmmv7PTi6E/AlE2x+37Lfy4JiwSzq4/fGEi04 Izoo5tIfusgbD1PSMjbJwQRLFCkoiNJn332zYEWlbRnrIKm8uWpBUUHoS 9M4blfoRqmJLyB+QLGBYwpiGjbLLL6ra394IHHrVub8ImFSoVT89+/Jg+ Q1xY02akVnzfjZfbPKVrJIh8h4ov8KfPZof02GFyg1VqxzcCGV8Xm9agg oufU2Xkt6Ij3Y4QGo6YF5qCY/eLcmzy3m3tlzLClgt1FmSGb88FKEAfsF Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=n7aapUEO Subject: [Intel-wired-lan] [PATH iwl-next v2 1/1] e1000e: Minor flow correction in e1000_shutdown function X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: david.m.ertman@intel.com, Vitaly Lifshits Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Add curly braces to avoid entering to an if statement where it is not always required in e1000_shutdown function. This improves code readability and might prevent a non-deterministic behaviour in the future. Signed-off-by: Vitaly Lifshits --- v2: fix commit message v1: initial version --- drivers/net/ethernet/intel/e1000e/netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index af5d9d97a0d6..cc8c531ec3df 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6688,14 +6688,14 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool runtime) if (adapter->hw.phy.type == e1000_phy_igp_3) { e1000e_igp3_phy_powerdown_workaround_ich8lan(&adapter->hw); } else if (hw->mac.type >= e1000_pch_lpt) { - if (wufc && !(wufc & (E1000_WUFC_EX | E1000_WUFC_MC | E1000_WUFC_BC))) + if (wufc && !(wufc & (E1000_WUFC_EX | E1000_WUFC_MC | E1000_WUFC_BC))) { /* ULP does not support wake from unicast, multicast * or broadcast. */ retval = e1000_enable_ulp_lpt_lp(hw, !runtime); - - if (retval) - return retval; + if (retval) + return retval; + } } /* Ensure that the appropriate bits are set in LPI_CTRL -- 2.34.1