Re: [PATCH] usb: misc: cytherm: replace deprecated simple_strtoul with kstrtoint
From: Jad Keskes
Date: Wed Jul 08 2026 - 11:44:38 EST
On 07/08, Greg KH wrote:
> This changes the user/kernel functionality, are you sure it is safe to
> do so?
Nobody writes garbage to these on purpose, and if they do by accident
they should get an error, not 0. The only way this breaks is if some
tool depends on "echo foo > brightness" silently setting to 0 — which
would be a bug in that tool.
> What is wrong with leaving the current calls?
simple_strtoul is deprecated per deprecated.rst. It ignores overflows
too — writing -1 wraps to ULONG_MAX then gets clamped to 0xFF instead
of erroring out. kstrtoint returns -EINVAL for both.