From: Simon Horman <horms@kernel.org>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH linux-next] e1000: Remove redundant statement
Date: Wed, 20 Oct 2021 11:25:37 +0200 [thread overview]
Message-ID: <20211020092537.GF3935@kernel.org> (raw)
In-Reply-To: <20211018085305.853996-1-luo.penghao@zte.com.cn>
On Mon, Oct 18, 2021 at 08:53:05AM +0000, luo penghao wrote:
nit: s/linux-next/net-next/ in subject
> This statement is redundant in the context, because there will be
> an identical statement next. otherwise, the variable initialization
> is actually unnecessary.
>
> The clang_analyzer complains as follows:
>
> drivers/net/ethernet/intel/e1000/e1000_ethtool.c:1218:2 warning:
>
> 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>
> ---
> drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> index 0a57172..8951f2a 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> @@ -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);
> -
> /* force 1000, set loopback */
> e1000_write_phy_reg(hw, PHY_CTRL, 0x4140);
>
> --
> 2.15.2
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: luo penghao <cgel.zte@gmail.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
luo penghao <luo.penghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] e1000: Remove redundant statement
Date: Wed, 20 Oct 2021 11:25:37 +0200 [thread overview]
Message-ID: <20211020092537.GF3935@kernel.org> (raw)
In-Reply-To: <20211018085305.853996-1-luo.penghao@zte.com.cn>
On Mon, Oct 18, 2021 at 08:53:05AM +0000, luo penghao wrote:
nit: s/linux-next/net-next/ in subject
> This statement is redundant in the context, because there will be
> an identical statement next. otherwise, the variable initialization
> is actually unnecessary.
>
> The clang_analyzer complains as follows:
>
> drivers/net/ethernet/intel/e1000/e1000_ethtool.c:1218:2 warning:
>
> 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>
> ---
> drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> index 0a57172..8951f2a 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
> @@ -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);
> -
> /* force 1000, set loopback */
> e1000_write_phy_reg(hw, PHY_CTRL, 0x4140);
>
> --
> 2.15.2
>
>
next prev parent reply other threads:[~2021-10-20 9:25 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 [this message]
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
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=20211020092537.GF3935@kernel.org \
--to=horms@kernel.org \
--cc=intel-wired-lan@osuosl.org \
/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.