2022-07-09 14:48:19

by Yuan, Perry

[permalink] [raw]
Subject: [PATCH v2 14/14] cpufreq: CPPC: remove the acpi_disabled check

"acpi_cpc_valid" function already includes the acpi_disabled check and we can
remove the duplicated check here

Signed-off-by: Perry Yuan <[email protected]>
---
drivers/cpufreq/cppc_cpufreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 24eaf0ec344d..9adb7612993e 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -947,7 +947,7 @@ static int __init cppc_cpufreq_init(void)
{
int ret;

- if ((acpi_disabled) || !acpi_cpc_valid())
+ if (!acpi_cpc_valid())
return -ENODEV;

cppc_check_hisi_workaround();
--
2.25.1


2022-07-11 19:44:49

by Nathan Fontenot

[permalink] [raw]
Subject: Re: [PATCH v2 14/14] cpufreq: CPPC: remove the acpi_disabled check

On 7/9/22 09:20, Perry Yuan wrote:
> "acpi_cpc_valid" function already includes the acpi_disabled check and we can
> remove the duplicated check here
>
> Signed-off-by: Perry Yuan <[email protected]>
> ---
> drivers/cpufreq/cppc_cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
> index 24eaf0ec344d..9adb7612993e 100644
> --- a/drivers/cpufreq/cppc_cpufreq.c
> +++ b/drivers/cpufreq/cppc_cpufreq.c
> @@ -947,7 +947,7 @@ static int __init cppc_cpufreq_init(void)
> {
> int ret;
>
> - if ((acpi_disabled) || !acpi_cpc_valid())
> + if (!acpi_cpc_valid())

Same comment here as for patch 13/14, this change should be part of patch 11/14.

-Nathan

> return -ENODEV;
>
> cppc_check_hisi_workaround();

2022-07-12 05:09:57

by Yuan, Perry

[permalink] [raw]
Subject: RE: [PATCH v2 14/14] cpufreq: CPPC: remove the acpi_disabled check

[AMD Official Use Only - General]

Hi Nathan.

> -----Original Message-----
> From: Fontenot, Nathan <[email protected]>
> Sent: Tuesday, July 12, 2022 3:30 AM
> To: Yuan, Perry <[email protected]>; [email protected];
> [email protected]; Huang, Ray <[email protected]>
> Cc: Sharma, Deepak <[email protected]>; Limonciello, Mario
> <[email protected]>; Fontenot, Nathan
> <[email protected]>; Deucher, Alexander
> <[email protected]>; Su, Jinzhou (Joe) <[email protected]>;
> Huang, Shimmer <[email protected]>; Du, Xiaojian
> <[email protected]>; Meng, Li (Jassmine) <[email protected]>; linux-
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 14/14] cpufreq: CPPC: remove the acpi_disabled
> check
>
> On 7/9/22 09:20, Perry Yuan wrote:
> > "acpi_cpc_valid" function already includes the acpi_disabled check and
> > we can remove the duplicated check here
> >
> > Signed-off-by: Perry Yuan <[email protected]>
> > ---
> > drivers/cpufreq/cppc_cpufreq.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/cppc_cpufreq.c
> > b/drivers/cpufreq/cppc_cpufreq.c index 24eaf0ec344d..9adb7612993e
> > 100644
> > --- a/drivers/cpufreq/cppc_cpufreq.c
> > +++ b/drivers/cpufreq/cppc_cpufreq.c
> > @@ -947,7 +947,7 @@ static int __init cppc_cpufreq_init(void) {
> > int ret;
> >
> > - if ((acpi_disabled) || !acpi_cpc_valid())
> > + if (!acpi_cpc_valid())
>
> Same comment here as for patch 13/14, this change should be part of patch
> 11/14.
>
> -Nathan

I can do that, at first, I also want to make the changes in one patch, but I posted this patch to see if maintainers can accept this way or another way.

Perry.


>
> > return -ENODEV;
> >
> > cppc_check_hisi_workaround();