[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191113154007.GJ10875@lunn.ch>
Date: Wed, 13 Nov 2019 16:40:07 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Bryan.Whitehead@...rochip.com
Cc: davem@...emloft.net, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v1 net-next] mscc.c: Add support for additional VSC PHYs
> Hi Andrew,
>
> I would like to do exactly that, but I was concerned future changes might change the phy_id_mask, so to keep code less brittle, and more flexible I thought I should keep the "AND mask" operations such as (PHY_ID_VSC8<FOO> & phydev->drv->phy_id_mask)
Hi Bryan
You could add a WARN_ON(phydev->drv->phy_id_mask & 0xf); That should
catch any new PHY breaking the assumption.
Andrew
Powered by blists - more mailing lists