From: David Miller <davem@davemloft.net>
To: yanjun.zhu@oracle.com
Cc: netdev@vger.kernel.org, keescook@chromium.org
Subject: Re: [PATCH net-next 1/1] forcedeth: remove unused variable
Date: Mon, 15 Jan 2018 15:11:29 -0500 (EST) [thread overview]
Message-ID: <20180115.151129.548561689212709042.davem@davemloft.net> (raw)
In-Reply-To: <1515994342-21352-1-git-send-email-yanjun.zhu@oracle.com>
From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Mon, 15 Jan 2018 00:32:22 -0500
> The variable miistat is not used. So it is removed.
>
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Joe Jin <joe.jin@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> ---
> drivers/net/ethernet/nvidia/forcedeth.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
> index 21e15cb..c518f8c 100644
> --- a/drivers/net/ethernet/nvidia/forcedeth.c
> +++ b/drivers/net/ethernet/nvidia/forcedeth.c
> @@ -5510,11 +5510,8 @@ static int nv_open(struct net_device *dev)
> /* One manual link speed update: Interrupts are enabled, future link
> * speed changes cause interrupts and are handled by nv_link_irq().
> */
> - {
> - u32 miistat;
> - miistat = readl(base + NvRegMIIStatus);
> - writel(NVREG_MIISTAT_MASK_ALL, base + NvRegMIIStatus);
> - }
> + writel(NVREG_MIISTAT_MASK_ALL, base + NvRegMIIStatus);
> +
The readl() may have side effects and be necessary to clear some state
in the register. I don't think you can remove the readl() without
verifying this and making sure it really is not necessary.
I can't apply this patch, sorry.
next prev parent reply other threads:[~2018-01-15 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 5:32 [PATCH net-next 1/1] forcedeth: remove unused variable Zhu Yanjun
2018-01-15 20:11 ` David Miller [this message]
2018-01-17 2:59 ` [PATCHv2 " Zhu Yanjun
2018-01-19 19:32 ` David Miller
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=20180115.151129.548561689212709042.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=keescook@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=yanjun.zhu@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).