[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c63316ac-696d-4ca9-8169-109ed1739f2a@lunn.ch>
Date: Wed, 18 Dec 2024 18:16:20 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Dimitri Fedrau <dima.fedrau@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"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: [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on
DP83822
> By the way. Wouldn't it be helpful adding a u32 max_leds to
> struct phy_driver ? Every driver supporting PHY LEDs validates index at the
> moment. With max_leds it should be easy to check it in of_phy_leds and
> return with an error if index is not valid.
I have been considering it. However, so far developers have been good
at adding the checks, because the first driver had the checks, cargo
cult at its best.
If we are going to add it, we should do it early, before there are too
many PHY drivers which need updating.
Andrew
Powered by blists - more mailing lists