Re: [PATCH net] net: phy: dp83867: Fix various styling and space issues
From: Andrew Lunn
Date: Thu Sep 03 2020 - 16:42:25 EST
> > > #define DP83867_CFG4_SGMII_ANEG_MASK (BIT(5) | BIT(6))
> > > #define DP83867_CFG4_SGMII_ANEG_TIMER_11MS (3 << 5)
> > > #define DP83867_CFG4_SGMII_ANEG_TIMER_800US (2 << 5)
> > > -#define DP83867_CFG4_SGMII_ANEG_TIMER_2US (1 << 5)
> > > +#define DP83867_CFG4_SGMII_ANEG_TIMER_2US BIT(5)
> >
> > Now the definitions are inconsistent, you would want to drop this one
> > and stick to the existing style.
>
> OK I was a little conflicted making that change due to the reasons you
> mentioned. But if that is an acceptable warning I am ok with it.
Hi Dan
I work around this by using hex:
#define DP83867_CFG4_SGMII_ANEG_TIMER_11MS (0x3 << 5)
#define DP83867_CFG4_SGMII_ANEG_TIMER_800US (0x2 << 5)
#define DP83867_CFG4_SGMII_ANEG_TIMER_2US (0x1 << 5)
checkpatch does not complain about that.
Andrew