[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_UyYgkLAvbU0ufp@shell.armlinux.org.uk>
Date: Tue, 8 Apr 2025 15:27:46 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>, Joe Damato <jdamato@...tly.com>
Cc: Michael Klein <michael@...sekall.de>,
Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RESEND net-next v5 1/4] net: phy: realtek: Group RTL82* macro
definitions
On Tue, Apr 08, 2025 at 02:17:19PM +0200, Andrew Lunn wrote:
> This i don't follow, you normally keep register bits next to the
> register. This is particularly important when the register bits don't
> have the register name embedded within it.
Agreed - the worst thing is when one reads driver code, where the
registers offsets are all defined one after each other, and the
individual register bits are defined elsewhere and without prefixes
that identify which register they pertain to or comments that identify
that.
So yes, please keep register bits and bitfield definitions next to
the register offset definition they pertain to, it's way nicer to
read that way.
Also, having register offset definitions sorted by offset means when
reading documentation, locating the definitions actually used is much
easier. Using the same value (hex or decimal) as the documentation
also aids this.
--
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