[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109064349.22c71a09@kernel.org>
Date: Fri, 9 Jan 2026 06:43:49 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Andrew Lunn <andrew+netdev@...n.ch>,
Russell King - ARM Linux <linux@...linux.org.uk>, Paolo Abeni
<pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, David Miller
<davem@...emloft.net>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: fixed_phy: replace list of fixed
PHYs with static array
On Fri, 9 Jan 2026 12:00:41 +0100 Heiner Kallweit wrote:
> >> +static struct fixed_phy fmb_fixed_phys[NUM_FP];
> >> static struct mii_bus *fmb_mii_bus;
> >> -static LIST_HEAD(fmb_phys);
> >> +static DEFINE_IDA(phy_fixed_ida);
> >
> > Isn't IDA an overkill for a range this tiny?
> > IDA is useful if the ID range is large and may be sparse.
> > Here a bitmap would suffice.
>
> Thanks for the suggestion! The IDA has been there forever, just the definition
> has been moved now. I think switching to a bitmap is a good option.
> Can we handle this as a follow-up?
I see.. Still I think that deleting the IDA in the same patch makes
sense. IDA makes no sense for a small fixed-size array and we're
touching a number of the relevant lines, anyway.
Powered by blists - more mailing lists