From: Greg KH <gregkh@linuxfoundation.org>
To: Jad Keskes <inasj268@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: misc: cytherm: replace deprecated simple_strtoul with kstrtoint
Date: Fri, 10 Jul 2026 15:11:03 +0200 [thread overview]
Message-ID: <2026071040-attire-bounding-6539@gregkh> (raw)
In-Reply-To: <ak5pje51q2PLEAC-@fedora>
On Wed, Jul 08, 2026 at 04:20:03PM +0100, Jad Keskes wrote:
> 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.
Sure, it's deprecated, so don't add it to new code, but for existing
stuff, don't change how user/kernel interactions might work.
thanks,
greg k-h
prev parent reply other threads:[~2026-07-10 13:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 12:31 [PATCH] usb: misc: cytherm: replace deprecated simple_strtoul with kstrtoint Jad Keskes
2026-07-08 15:12 ` Greg KH
2026-07-08 15:20 ` Jad Keskes
2026-07-10 13:11 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026071040-attire-bounding-6539@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=inasj268@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox