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.