On 05/24/2018 01:15 PM, Heiner Kallweit wrote:
> This patch is a follow-up to 87e5808d52b6 ("net: phy: replace bool
> members in struct phy_device with bit-fields") and converts further
> flags to bit-fields.

This looks fine, but then you would also have to clean-up all code that
does phydev->asym_pause = 1 and phydev->pause = 1 to use true/false
instead, I am not sure there is much value in doing that for these
fields considering that they are exposed to drivers so there is a risk
of possible breakage.

Thanks!

> 
> Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
> ---
>  include/linux/phy.h | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index 6cd090984..cc66f2834 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -418,21 +418,20 @@ struct phy_device {
>       /* The most recently read link state */
>       unsigned link:1;
>  
> +     /* forced speed & duplex (no autoneg)
> +      * partner speed & duplex & pause (autoneg)
> +      */
> +     unsigned pause:1;
> +     unsigned asym_pause:1;
> +     int speed;
> +     int duplex;
> +
>       enum phy_state state;
>  
>       u32 dev_flags;
>  
>       phy_interface_t interface;
>  
> -     /*
> -      * forced speed & duplex (no autoneg)
> -      * partner speed & duplex & pause (autoneg)
> -      */
> -     int speed;
> -     int duplex;
> -     int pause;
> -     int asym_pause;
> -
>       /* Enabled Interrupts */
>       u32 interrupts;
>  
> 


-- 
Florian

Reply via email to