[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1GXWtZbJMgUq9zk@shell.armlinux.org.uk>
Date: Thu, 5 Dec 2024 12:06:50 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Jonathan Corbet <corbet@....net>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Simon Horman <horms@...nel.org>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH net-next v1 3/7] phy: replace bitwise flag definitions
with BIT() macro
On Thu, Dec 05, 2024 at 12:02:19PM +0000, Russell King (Oracle) wrote:
> On Tue, Dec 03, 2024 at 08:56:17AM +0100, Oleksij Rempel wrote:
> > Convert the PHY flag definitions to use the BIT() macro instead of
> > hexadecimal values. This improves readability and maintainability.
>
> Maybe only readability. One can argue that changing them introduces the
> possibility of conflicts when porting patches which adds maintenance
> burden.
Thinking a bit more about this, we can do much better to improve
readability. The question that stands out right now is "but what
are these flags used for?" and their definition doesn't make any
hint.
The PHY_* constants are for struct phy_driver.flags, and I think
this needs to be documented. I think that's a much more important
detail here that would massively improve readability way beyond
simply changing them to be defined in terms of BIT().
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists