Re: [PATCH v2] ALSA: control: Fix parsing of numeric fields
From: Takashi Iwai
Date: Sun Nov 08 2026 - 07:06:43 EST
On Sun, 08 Nov 2026 12:18:48 +0100,
Sreeraj S Kurup wrote:
>
> Hi Takashi,
>
> I compared the approaches.
>
> Using simple_strtoul() would provide an end pointer, but it is deprecated.
>
> Another option is to retain kstrtoull() from the original implementation
> and apply the delimiter-first approach. This would minimize changes to the
> existing conversion logic.
>
> However, since the destination is an unsigned int, kstrtouint() better matches
> the destination type and also detects values outside the unsigned int range.
>
> I currently prefer the v2 approach, but wanted to point out this difference in
> overflow handling.
OK, thanks. Feel free to resubmit whatever you find better :)
Takashi