Messages in this thread | | | From | "Yuan, Perry" <> | Subject | RE: [PATCH v9 09/13] cpufreq: amd-pstate: add driver working mode switch support | Date | Fri, 6 Jan 2023 02:52:48 +0000 |
| |
[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
| |