lkml.org 
[lkml]   [2023]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v9 09/13] cpufreq: amd-pstate: add driver working mode switch support
Date
[AMD Official Use Only - General]

Hi Wyes.

> -----Original Message-----
> From: Karny, Wyes <Wyes.Karny@amd.com>
> Sent: Friday, January 6, 2023 12:04 AM
> To: Yuan, Perry <Perry.Yuan@amd.com>; rafael.j.wysocki@intel.com;
> Limonciello, Mario <Mario.Limonciello@amd.com>; Huang, Ray
> <Ray.Huang@amd.com>; viresh.kumar@linaro.org
> Cc: Sharma, Deepak <Deepak.Sharma@amd.com>; Fontenot, Nathan
> <Nathan.Fontenot@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Huang, Shimmer
> <Shimmer.Huang@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com>; Meng,
> Li (Jassmine) <Li.Meng@amd.com>; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v9 09/13] cpufreq: amd-pstate: add driver working mode
> switch support
>
> Hi Perry,
>
> On 12/25/2022 10:04 PM, Perry Yuan wrote:
> -------------------------------->8--------------------------------
> > +
> > +static int amd_pstate_update_status(const char *buf, size_t size) {
> > + int ret;
> > + int mode_idx;
> > +
> > + if (size > 7 || size < 3)
> > + return -EINVAL;
> > + mode_idx = get_mode_idx_from_str(buf, size);
>
> if (size > 7 || size < 6) right?
> because possible strings are: "disable", "passive" and "active".
>

Since I remove the "off" string for the v10 series, So Yes, It will be good to update the size checking.

Perry.

> --
> Thanks & Regards,
> Wyes
\
 
 \ /
  Last update: 2023-03-26 23:29    [W:0.194 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site