[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58476ACB.3030206@codeaurora.org>
Date: Tue, 6 Dec 2016 19:50:03 -0600
From: Timur Tabi <timur@...eaurora.org>
To: Florian Fainelli <f.fainelli@...il.com>,
David Miller <davem@...emloft.net>, jon.mason@...adcom.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] [v3] net: phy: phy drivers should not set
SUPPORTED_[Asym_]Pause
Florian Fainelli wrote:
>> + if (phydrv->features & (SUPPORTED_Pause | SUPPORTED_Asym_Pause)) {
>> >+ phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>> >+ phydev->supported |= phydrv->features &
>> >+ (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
> Is not the & (SUPPORTED_Pause | SUPPORTED_Asym_Pause) redundant here anyway?
I'm just trying to be safe. Can I be certain that those bits are
already zero?
>
>> >+ } else {
>> >+ phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> that part looks good.
>
>> >+ }
>> >+
>> >+ phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> but this one basically "undoes" what the if () clause did where we
> checked if either, or one of the two bits was already set?
Ugh, sorry. I thought I deleted that before sending the patch out.
I'll send out a v4 tomorrow.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, hosted by The Linux Foundation.
Powered by blists - more mailing lists