[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <cc2aab32-35be-f11a-6bf1-aeb522019456@amd.com>
Date: Thu, 25 May 2023 23:37:31 +0530
From: Raju Rangoju <Raju.Rangoju@....com>
To: Tom Lendacky <thomas.lendacky@....com>, netdev@...r.kernel.org
Cc: Sudheesh Mavila <sudheesh.mavila@....com>,
Simon Horman <simon.horman@...igine.com>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>
Subject: Re: [PATCH v2 net] amd-xgbe: fix the false linkup in xgbe_phy_status
On 5/25/2023 8:11 PM, Tom Lendacky wrote:
>> @@ -1367,8 +1367,13 @@ static void xgbe_phy_status_result(struct
>> xgbe_prv_data *pdata)
>> pdata->phy.duplex = DUPLEX_FULL;
>> - if (xgbe_set_mode(pdata, mode) && pdata->an_again)
>> - xgbe_phy_reconfig_aneg(pdata);
>> + if (xgbe_set_mode(pdata, mode)) {
>> + if (pdata->an_again)
>> + xgbe_phy_reconfig_aneg(pdata);
>> + return true;
>> + }
>> +
>> + return false;
>
> Just a nit (and only my opinion) for better code readability, but you
> can save some indentation and make this a bit cleaner by doing:
Thanks Tom for the suggestion. I'll fix it in v3.
>
> if (!xgbe_set_mode(pdata, mode))
> return false;
>
> if (pdata->an_again)
> xgbe_phy_reconfig_aneg(pdata);
>
> return true;
>
> Thanks,
> Tom
>
>> }
>> static void xgbe_phy_status(struct xgbe_prv_data *pdata)
Powered by blists - more mailing lists