[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a68a52d9-86e7-4c1c-970d-a8fd6a02fc8e@lunn.ch>
Date: Thu, 4 Apr 2024 01:43:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <olteanv@...il.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
Gregory Clement <gregory.clement@...tlin.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 2/7] net: Add helpers for netdev LEDs
> Should we be even more opaque in the API, aka instead of requiring the
> user to explicitly hold a struct list_head, just give it an opaque
> struct netdev_led_group * which holds that (as a hidden implementation
> detail)?
>
> The API structure could be simply styled as
> "struct netdev_led_group *netdev_led_group_create()" and
> "void netdev_led_group_destroy(const struct netdev_led_group *group)",
> and it would allow for future editing of the actual implementation.
>
> Just an idea.
Hi Vladimir
I'm not sure making it opaque brings much for this case. It is so
simple. Things like phylink should be opaque, there is a lot of
internal state which if used in a MAC driver is going to cause all
sorts of problem, and is likely to be used wrong. But here?
So i will probably leave this transparent.
Thanks for the other comments. I'm slowly working on them as time
permits.
Andrew
Powered by blists - more mailing lists