From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Bivash Kumar Singh <bivashraj750@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v4] Input: gunze: replace deprecated APIs and fix warning style
Date: Sun, 19 Jul 2026 18:24:21 -0700 [thread overview]
Message-ID: <al12MNI0HbNLEi3w@google.com> (raw)
In-Reply-To: <20260719173700.4942-1-bivashraj750@gmail.com>
On Sun, Jul 19, 2026 at 11:07:00PM +0530, Bivash Kumar Singh wrote:
> Replace two uses of simple_strtoul() with kstrtoul() as the former
> is deprecated. kstrtoul() requires a NUL-terminated string, so copy
> the packet data into a local buffer and NUL-terminate the X and Y
> fields before parsing. Initialize x and y to 0 so that if parsing
> fails the coordinates fall back to 0 rather than reporting garbage,
> and BTN_TOUCH is always updated regardless of parse result.
Please stop forcing use of kstrtoul() where it is not fit. If you want
to stop using simple_strtoul() then add '\0' when receive '\r' in
gunze_interrupt(), and use
if (sscanf(gunze->data + 1, "%4u,%4u", &x, &y) != 2) {
dev_warn_ratelimited(...);
return;
}
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-07-20 1:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 19:00 [PATCH] Input: gunze: replace deprecated APIs and fix warning style Bivash Kumar Singh
2026-07-18 19:12 ` sashiko-bot
2026-07-19 5:41 ` [PATCH v2] " Bivash Kumar Singh
2026-07-19 5:53 ` sashiko-bot
2026-07-19 6:02 ` [PATCH v3] " Bivash Kumar Singh
2026-07-19 6:13 ` sashiko-bot
2026-07-19 17:37 ` [PATCH v4] " Bivash Kumar Singh
2026-07-19 17:54 ` sashiko-bot
2026-07-20 1:24 ` Dmitry Torokhov [this message]
2026-07-20 3:24 ` [PATCH v5] " Bivash Kumar Singh
2026-07-20 3:32 ` sashiko-bot
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=al12MNI0HbNLEi3w@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=bivashraj750@gmail.com \
--cc=linux-input@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.