From: Takashi Iwai <tiwai@suse.de>
To: Hongbo Li <lihongbo22@huawei.com>
Cc: <perex@perex.cz>, <tiwai@suse.com>, <linux-sound@vger.kernel.org>
Subject: Re: [PATCH -next v2] ALSA: pcm: replace simple_strtoul to kstrtoul
Date: Sat, 31 Aug 2024 12:58:25 +0200 [thread overview]
Message-ID: <87h6b1j6we.wl-tiwai@suse.de> (raw)
In-Reply-To: <20240831080639.3985143-1-lihongbo22@huawei.com>
On Sat, 31 Aug 2024 10:06:39 +0200,
Hongbo Li wrote:
>
> As mentioned in [1], "...simple_strtol(), simple_strtoll(),
> simple_strtoul(), and simple_strtoull() functions explicitly
> ignore overflows, which may lead to unexpected results in callers."
> Hence, the use of those functions is discouraged.
>
> This patch replace the use of the simple_strtoul with the safer
> alternatives kstrtoul.
>
> [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
>
> ---
> v2:
> - Avoid introducing the ret variable, suggested by Takashi.
>
> v1: https://lore.kernel.org/all/1e4bee4b-023c-40e2-ac4a-f71299fa2efd@huawei.com/T/
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2024-08-31 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-31 8:06 [PATCH -next v2] ALSA: pcm: replace simple_strtoul to kstrtoul Hongbo Li
2024-08-31 10:58 ` Takashi Iwai [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=87h6b1j6we.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=lihongbo22@huawei.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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