From patchwork Thu Feb 4 00:42:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12065895 X-Patchwork-Delegate: kuba@kernel.org 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 2585EC433DB for ; Thu, 4 Feb 2021 00:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D085A64F4C for ; Thu, 4 Feb 2021 00:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234312AbhBDApr (ORCPT ); Wed, 3 Feb 2021 19:45:47 -0500 Received: from mga11.intel.com ([192.55.52.93]:40026 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234544AbhBDApa (ORCPT ); Wed, 3 Feb 2021 19:45:30 -0500 IronPort-SDR: gBq5+ztzBvabFFcHnHfrsXbuWJjpol+3pTi7MNVdCITmbo8DPpiNAFe4jB60dwDThldR3hPRHJ FRjIocDsmLvQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="177638238" X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="177638238" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 16:42:15 -0800 IronPort-SDR: vhTz0YvzWnZiWNuupDZkU8emnOjqFn/9sz6A6c/IUzqypF6MYg1vQuS1pVyqioYUlDBGAyNzuJ YjBoW4cW6RHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,399,1602572400"; d="scan'208";a="579687522" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by fmsmga006.fm.intel.com with ESMTP; 03 Feb 2021 16:42:14 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Kaixu Xia , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Tosk Robot Subject: [PATCH net-next 14/15] e1000e: remove the redundant value assignment in e1000_update_nvm_checksum_spt Date: Wed, 3 Feb 2021 16:42:58 -0800 Message-Id: <20210204004259.3662059-15-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> References: <20210204004259.3662059-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Kaixu Xia Both of the statements are value assignment of the variable act_offset. The first value assignment is overwritten by the second and is useless. Remove it. Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000e/ich8lan.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 6fb46682b058..0ac8d79a7987 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c @@ -3886,13 +3886,6 @@ static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw) if (ret_val) goto release; - /* And invalidate the previously valid segment by setting - * its signature word (0x13) high_byte to 0b. This can be - * done without an erase because flash erase sets all bits - * to 1's. We can write 1's to 0's without an erase - */ - act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1; - /* offset in words but we read dword */ act_offset = old_bank_offset + E1000_ICH_NVM_SIG_WORD - 1; ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset, &dword);