[PATCH 1/3] firmware: arm_scmi: quirk: Improve quirk range parsing

Sudeep Holla sudeep.holla at kernel.org
Thu Apr 30 03:16:56 PDT 2026


On Fri, Apr 03, 2026 at 10:41:29AM +0200, Geert Uytterhoeven wrote:
> When a range contains only an end ("-X"), the number string is parsed
> twice, as both "sep == first" and "sep != last" are true.  Fix this by
> dropping the superfluous number parsing for "sep == first".
> 
> This does have a harmless functional impact for the unbounded range:
> "-" is now accepted, while it was rejected before.
> 

Supporting "-" is good but I think the ret is uninitialised in that case
as sep, first and last are all equal. If you agree, I can patch up by
initialising ret to 0. Let me know if I am missing any other case where
it is not good to have ret initialised to 0.

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list