From: Simon Horman <horms@kernel.org>
To: Jesse Brandeburg <jesse.brandeburg@gmail.com>
Cc: luo penghao <cgel.zte@gmail.com>,
NetDEV list <netdev@vger.kernel.org>,
Zeal Robot <zealci@zte.com.cn>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
intel-wired-lan@lists.osuosl.org,
Jakub Kicinski <kuba@kernel.org>,
luo penghao <luo.penghao@zte.com.cn>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH linux-next] e1000: Remove redundant statement
Date: Thu, 21 Oct 2021 09:09:40 +0200 [thread overview]
Message-ID: <20211021070937.GA9814@kernel.org> (raw)
In-Reply-To: <CAEuXFEzXSU-Ws6T_8TBVfgskh4VA14LmirFYSjdQpwtndfeeww@mail.gmail.com>
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 <horms@kernel.org> wrote:
>
> > > Value stored to 'ctrl_reg' is never read.
> >
> > I agree this does seem to be the case.
> >
> > > Reported-by: Zeal Robot <zealci@zte.com.cn>
> > > Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
> >
> > Reviewed-by: Simon Horman <horms@kernel.org>
>
> 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.
>
prev parent reply other threads:[~2021-10-21 7:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 8:53 [Intel-wired-lan] [PATCH linux-next] e1000: Remove redundant statement luo penghao
2021-10-18 8:53 ` luo penghao
2021-10-18 16:10 ` [Intel-wired-lan] " jesse.brandeburg
2021-10-20 17:51 ` Jesse Brandeburg
2021-10-20 9:25 ` Simon Horman
2021-10-20 9:25 ` Simon Horman
2021-10-20 18:08 ` [Intel-wired-lan] " Jesse Brandeburg
2021-10-20 18:08 ` Jesse Brandeburg
2021-10-21 7:09 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211021070937.GA9814@kernel.org \
--to=horms@kernel.org \
--cc=cgel.zte@gmail.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luo.penghao@zte.com.cn \
--cc=netdev@vger.kernel.org \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.