[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCB0dkhiO49NJhyX@shell.armlinux.org.uk>
Date: Sun, 11 May 2025 10:57:10 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, 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>,
Daniel Golle <daniel@...rotopia.org>,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [net PATCH] net: phy: aquantia: fix wrong GENMASK define for
LED_PROV_ACT_STRETCH
On Sun, May 11, 2025 at 11:06:17AM +0200, Christian Marangi wrote:
> In defining VEND1_GLOBAL_LED_PROV_ACT_STRETCH there was a typo where the
> GENMASK definition was swapped.
>
> Fix it to prevent any kind of misconfiguration if ever this define will
> be used in the future.
I thought GENMASK() was supposed to warn about this kind of thing. I've
questioned in the past whether GENMASK() is better than defining fields
with hex numbers, and each time I see another repeat of this exact case,
I re-question whether GENMASK() actually gives much benefit over hex
numbers because it's just too easy to get the two arguments to
GENMASK() swapped and it's never obvious that's happened.
I don't remember there being a dribble of patches in the past
correcting bitfields defined using hex numbers, but that seems common
with GENMASK().
--
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