From: Zhu Yanjun <[email protected]> Date: Mon, 15 Jan 2018 00:32:22 -0500
> The variable miistat is not used. So it is removed. > > CC: Srinivas Eeda <[email protected]> > CC: Joe Jin <[email protected]> > CC: Junxiao Bi <[email protected]> > Signed-off-by: Zhu Yanjun <[email protected]> > --- > 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.
