From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Joe Damato <jdamato@fastly.com>
Cc: Michael Klein <michael@fossekall.de>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND net-next v5 1/4] net: phy: realtek: Group RTL82* macro definitions
Date: Tue, 8 Apr 2025 15:27:46 +0100 [thread overview]
Message-ID: <Z_UyYgkLAvbU0ufp@shell.armlinux.org.uk> (raw)
In-Reply-To: <96fcff68-6a96-49fe-b771-629d3bef03ea@lunn.ch>
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!
next prev parent reply other threads:[~2025-04-08 14:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 18:21 [RESEND net-next v5 0/4] net: phy: realtek: Add support for PHY LEDs on Michael Klein
2025-04-07 18:21 ` [RESEND net-next v5 1/4] net: phy: realtek: Group RTL82* macro definitions Michael Klein
2025-04-08 2:52 ` Joe Damato
2025-04-08 12:17 ` Andrew Lunn
2025-04-08 14:27 ` Russell King (Oracle) [this message]
2025-04-10 22:05 ` Michael Klein
2025-04-07 18:21 ` [RESEND net-next v5 2/4] net: phy: realtek: Clean up RTL8211E ExtPage access Michael Klein
2025-04-08 2:56 ` Joe Damato
2025-04-08 18:47 ` Michael Klein
2025-04-08 19:21 ` Andrew Lunn
2025-04-07 18:21 ` [RESEND net-next v5 3/4] net: phy: realtek: use __set_bit() in rtl8211f_led_hw_control_get() Michael Klein
2025-04-07 18:21 ` [RESEND net-next v5 4/4] net: phy: realtek: Add support for PHY LEDs on RTL8211E Michael Klein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_UyYgkLAvbU0ufp@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jdamato@fastly.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@fossekall.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).