From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Ian King Subject: Re: [PATCH] net: ethernet: sun: remove redundant variables adv and lpa Date: Thu, 5 Jul 2018 10:54:51 +0100 Message-ID: <22739fd9-1538-9abf-bfbe-5467196b4acf@canonical.com> References: <20180705093732.21650-1-colin.king@canonical.com> <20180705095207.3dldyjgqivp5drhc@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org To: Dan Carpenter Return-path: In-Reply-To: <20180705095207.3dldyjgqivp5drhc@mwanda> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 05/07/18 10:52, Dan Carpenter wrote: > On Thu, Jul 05, 2018 at 10:37:32AM +0100, Colin King wrote: >> diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c >> index 88c12474a0c3..2d6b62c6d9ab 100644 >> --- a/drivers/net/ethernet/sun/niu.c >> +++ b/drivers/net/ethernet/sun/niu.c >> @@ -1225,17 +1225,13 @@ static int link_status_1g_rgmii(struct niu *np, int *link_up_p) >> >> bmsr = err; >> if (bmsr & BMSR_LSTATUS) { >> - u16 adv, lpa; >> - >> err = mii_read(np, np->phy_addr, MII_ADVERTISE); >> if (err < 0) >> goto out; >> - adv = err; >> >> err = mii_read(np, np->phy_addr, MII_LPA); >> if (err < 0) >> goto out; >> - lpa = err; > > I'm fairly sure we could get rid of the mii_read() calls as well. I'm always concerned that removing the reads of H/W registers can affect the behavior, so I left those in. Colin > > regards, > dan carpenter > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >