[PATCH phy 2/6] phy: marvell: phy-mvebu-a3700-comphy: Add native kernel implementation

Pali Rohár pali at kernel.org
Thu Nov 25 02:58:54 PST 2021


On Tuesday 23 November 2021 12:56:24 Vinod Koul wrote:
> On 28-10-21, 20:42, Marek Behún wrote:
> > +#define COMPHY_SYNC_MASK_GEN_REG	0x25
> > +#define PHY_GEN_MAX_OFFSET		10
> > +#define PHY_GEN_MAX_MASK		(3 << PHY_GEN_MAX_OFFSET)
> 
> Pls use GENMASK()
> 
> > +#define PHY_GEN_USB3_5G			(1 << PHY_GEN_MAX_OFFSET)
> 
> this should be BIT(10)

I do not think. This PHY_GEN_USB3_5G macro is one of possible values
which can be set by PHY_GEN_MAX_OFFSET/PHY_GEN_MAX_MASK macros.
Completely removing references to PHY_GEN_MAX_* macros from
PHY_GEN_USB3_5G by replacing it with magic constant BIT(10) makes it
less readable and also it would lost information where it belongs.



More information about the linux-phy mailing list