[PATCH 1/2] mtd: mtdoops: replace simple_strtoul with kstrtouint
Miquel Raynal
miquel.raynal at bootlin.com
Mon Apr 27 06:13:43 PDT 2026
On Fri, 10 Apr 2026 21:37:34 +0800, Haoyu Lu wrote:
> Replace deprecated simple_strtoul with kstrtouint for better error
> handling and type safety. The kstrtouint function provides stricter
> validation, automatically rejecting inputs like "123abc" that
> simple_strtoul would partially accept.
>
> Using kstrtouint avoids unsigned long to int conversion and is more
> appropriate for MTD device indices which are non-negative integers.
>
> [...]
Applied to mtd/next, thanks!
[1/2] mtd: mtdoops: replace simple_strtoul with kstrtouint
commit: 6b07cdff176bc5f8fef459b85a7e2ea09e68543f
[2/2] mtd: mtdsuper: replace simple_strtoul with kstrtouint
commit: a92a9a49288d1aad67bd12457c80a1e3f463d85b
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl
More information about the linux-mtd
mailing list