From: Christian Marangi <ansuelsmth@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"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: [net-next PATCH v2] net: phy: Validate PHY LED OPs presence before registering
Date: Tue, 8 Oct 2024 15:13:34 +0200 [thread overview]
Message-ID: <67053002.050a0220.63ee8.6d11@mx.google.com> (raw)
In-Reply-To: <851ebd20-0f7a-438d-8035-366964d2c4d8@lunn.ch>
On Tue, Oct 08, 2024 at 03:08:32PM +0200, Andrew Lunn wrote:
> > + /* Check if the PHY driver have at least an OP to
> > + * set the LEDs.
> > + */
> > + if (!phydev->drv->led_brightness_set &&
> > + !phydev->drv->led_blink_set &&
> > + !phydev->drv->led_hw_control_set) {
>
> I think this condition is too strong. All that should be required is
> led_brightness_set(). The rest can be done in software.
>
Mhh the idea was really to check if one of the 3 is declared. Ideally to
future proof case where some led will only expose led_hw_control_set or
only led_blink_set?
--
Ansuel
next prev parent reply other threads:[~2024-10-08 13:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 18:33 [net-next PATCH v2] net: phy: Validate PHY LED OPs presence before registering Christian Marangi
2024-10-08 13:08 ` Andrew Lunn
2024-10-08 13:12 ` Daniel Golle
2024-10-08 13:13 ` Christian Marangi [this message]
2024-10-08 17:02 ` Andrew Lunn
2024-10-08 17:04 ` Christian Marangi
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=67053002.050a0220.63ee8.6d11@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=andrew@lunn.ch \
--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 \
/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