[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0g-+Wgkm6V2T0c47sEw0Ow3QCBJnFSZJdLiNy4zW5uzHA@mail.gmail.com>
Date: Wed, 21 May 2025 22:33:34 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: David Laight <david.laight.linux@...il.com>
Cc: Bowen Yu <yubowen8@...wei.com>, rafael@...nel.org, viresh.kumar@...aro.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, linuxarm@...wei.com,
zhanjie9@...ilicon.com, jonathan.cameron@...wei.com, lihuisong@...wei.com,
zhenglifeng1@...wei.com, cenxinghai@...artners.com
Subject: Re: [PATCH] cpufreq: Update sscanf() to kstrtouint()
On Mon, May 19, 2025 at 11:46 PM David Laight
<david.laight.linux@...il.com> wrote:
>
> On Mon, 19 May 2025 15:09:38 +0800
> Bowen Yu <yubowen8@...wei.com> wrote:
>
> > In store_scaling_setspeed(), sscanf is still used to read to sysfs.
> > Newer kstrtox provide more features including overflow protection,
> > better errorhandling and allows for other systems of numeration. It
> > is therefore better to update sscanf() to kstrtouint().
>
> This is a UAPI change.
> Since the value is a frequency there could easily be scripts
> that append Hz to the value.
Which would be incorrect because the value is in kHz.
They are not expected to do so in any case, though, so hopefully there
are none, in which case we don't want any to appear in the future.
> You're making them fail.
So if there are any, we'll get to know.
Powered by blists - more mailing lists