Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp346009pxb; Thu, 21 Oct 2021 00:12:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2ZQgdJyK3iEu/1yC5WPC62tLxR60AhiedhJX14SGcqOOyQYLWhTopVomJvX33rj1qmgpI X-Received: by 2002:a63:ac54:: with SMTP id z20mr3118702pgn.95.1634800326928; Thu, 21 Oct 2021 00:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634800326; cv=none; d=google.com; s=arc-20160816; b=Mxo4abyaC1B3hHh8C23ZunCGfmTF4Uj21RpSwa0DQBEm0UxFWzoK3YeXYykh9dff1A T+ub11J0R4J37iXnu3dAFQHor44Og3NXBVix/uPf9qLuqdUclk/ROZKAy204e8mjiBjN VL8d47yAQK8i4dn11y9Cjanp2JB257x8ShiPBKfL3BQtPaETPk9KG/G/NuT+1LQQeyx8 xKvgD2KkJozC7zcC35wA6yeNH3cyZSjOy4O4buJ9UEmWj2cm2rjb/8pLo4RGb8UwEZx6 yHjy3j+FZdX8EvLsQjFwgLnB5tYauHJQSngmeUXLvmaWYiGhLTB7wB9FzqzDI8sYArEE UUNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EUdKU10pZqqFSU1YZT5Ui+6qRlyw6/8tTWPdYilgPIg=; b=jCCS9SamnoDQg7ec2aso/v7JDEo+EJ9k0dbrQXOATBkVVoGTlV+iX9VVhihAQ5p747 Coarh8oID66j4I6Zmhc1DoE0Ml99hS9AkEQZV4pVCy1ohWCKfW9k6Mv6/4AC64BAXbox kboyJDKyveJAOtVDLgFULv8lD97fZzFqAuYiafBhAZXItIUOcW0grrw4oIaXpucalgU6 w2hBOjXMzYKI+s9hnvMQVzcFsiIJuhGZwGDrJleRQq2kg9UW839s4+O6Fw9KuM6j8Ojr Sn+l+jUx/KK/ZEpjjEnYCrC7LP9EzuJejt3wLjv6DFh5eQH+VBuxIZlcwVvqcm7wID78 lObA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZgSZM0i0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si5850265pgq.91.2021.10.21.00.11.54; Thu, 21 Oct 2021 00:12:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZgSZM0i0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231362AbhJUHMH (ORCPT + 99 others); Thu, 21 Oct 2021 03:12:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:56218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231357AbhJUHMB (ORCPT ); Thu, 21 Oct 2021 03:12:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 759C7606A5; Thu, 21 Oct 2021 07:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634800185; bh=jSUySDz8lzTVjjSD+1bRdCp3Zigy7nDut3K7EhQ19Ss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZgSZM0i0iMVGrkWnBIazW/Qx49Yz3PQWFlRDu8Vo0r8yKsOQLlI3jFLApU4vDCkr2 cFdABA9S5CblrjvDriVFWzwrlw+PtWeJvCND32jOWTw5fbTgAJdxIS6guoYTON2TQg sfx0oAyWAkeDYgDzZddL2WjhUu35bKWBR8lETlRpXgHPZRSFM8K0LLNGlDzYXwn7Tl nd/c1YUBzK1zBnvRewtf//2EOg+2oyNjU5jRlgMm1L7cCc6M5CJWovTGoYKEe70uV/ /qP3JBGBESFNNPGa6OtZ1uBc3Ke3Cfeo75PbvyjMAdwRLTDyCA2PxbbKenIFDqJbJJ 8Y5uuVzfrIltw== Date: Thu, 21 Oct 2021 09:09:40 +0200 From: Simon Horman To: Jesse Brandeburg Cc: luo penghao , NetDEV list , Zeal Robot , "linux-kernel@vger.kernel.org" , intel-wired-lan@lists.osuosl.org, Jakub Kicinski , luo penghao , "David S . Miller" Subject: Re: [Intel-wired-lan] [PATCH linux-next] e1000: Remove redundant statement Message-ID: <20211021070937.GA9814@kernel.org> References: <20211018085305.853996-1-luo.penghao@zte.com.cn> <20211020092537.GF3935@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 11:08:11AM -0700, Jesse Brandeburg wrote: > Apologies for the duplicates, mail from my intel account going out > through outlook.com is not being delivered. > > On Wed, Oct 20, 2021 at 7:00 AM Simon Horman wrote: > > > > Value stored to 'ctrl_reg' is never read. > > > > I agree this does seem to be the case. > > > > > Reported-by: Zeal Robot > > > Signed-off-by: luo penghao > > > > Reviewed-by: Simon Horman > > Thanks for the review, but (davem/kuba) please do not apply. Thanks, and sorry for misunderstanding the patch. > > > > @@ -1215,8 +1215,6 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) > > > e1000_write_phy_reg(hw, PHY_CTRL, 0x8140); > > > } > > > > > > - ctrl_reg = er32(CTRL); > > Thanks for your patch, but this change is not safe. you're removing a > read that could do two things. The first is that the read "flushes" > the write just above to PCI (it's a PCI barrier), and the second is > that the read can have some side effects. > > If this change must be done, the code should be to remove the > assignment to ctrl_reg, but leave the read, so the line would just > look like: > er32(CTRL); > > This will get rid of the warning and not change the flow from the > hardware perspective. > > > > - > > > /* force 1000, set loopback */ > > > e1000_write_phy_reg(hw, PHY_CTRL, 0x4140); > > > > > Please do not apply this. >