Re: [PATCH net-next] net: phy: fixed_phy: replace list of fixed PHYs with static array
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-09 14:43:50
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-01-09 14:43:50
On Fri, 9 Jan 2026 12:00:41 +0100 Heiner Kallweit wrote:
quoted
quoted
+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.