mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	Christian Marangi <ansuelsmth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	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>,
	Daniel Golle <daniel@makrotopia.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [net PATCH] net: phy: aquantia: fix wrong GENMASK define for LED_PROV_ACT_STRETCH
Date: Sun, 11 May 2025 12:06:38 +0200	[thread overview]
Message-ID: <e5a4fc33-4fe2-4078-83e5-596dff96bef9@wanadoo.fr> (raw)
In-Reply-To: <aCB0dkhiO49NJhyX@shell.armlinux.org.uk>

Le 11/05/2025 à 11:57, Russell King (Oracle) a écrit :
> 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().
> 

There is a compile time check, but in this case
VEND1_GLOBAL_LED_PROV_ACT_STRETCH looks unused. So it is never expanded 
and compiled.

CJ

  reply	other threads:[~2025-05-11 10:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-11  9:06 Christian Marangi
2025-05-11  9:57 ` Russell King (Oracle)
2025-05-11 10:06   ` Christophe JAILLET [this message]
2025-05-13  0:38     ` Jakub Kicinski
2025-05-11 10:06   ` Christian Marangi
2025-05-11 16:51 ` Andrew Lunn

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=e5a4fc33-4fe2-4078-83e5-596dff96bef9@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®