LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cpufreq: amd-pstate: fix code format problems
@ 2024-04-30  7:48 Perry Yuan
  2024-04-30  7:48 ` [PATCH 2/2] cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq Perry Yuan
  2024-04-30 10:23 ` [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Perry Yuan @ 2024-04-30  7:48 UTC (permalink / raw
  To: rafael.j.wysocki, Mario.Limonciello, viresh.kumar, gautham.shenoy,
	Borislav.Petkov, Ray.Huang
  Cc: Alexander.Deucher, Xinmei.Huang, oleksandr, Xiaojian.Du, Li.Meng,
	linux-pm, linux-kernel

get some code format problems fixed in the amd-pstate driver.

Changes Made:

- Fixed incorrect comment format in the functions.

- Removed unnecessary blank line.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404271148.HK9yHBlB-lkp@intel.com/
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/cpufreq/amd-pstate.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 83a29b257794..85656342a101 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -792,7 +792,7 @@ static void amd_pstate_update_limits(unsigned int cpu)
 	mutex_unlock(&amd_pstate_driver_lock);
 }
 
-/**
+/*
  * Get pstate transition delay time from ACPI tables that firmware set
  * instead of using hardcode value directly.
  */
@@ -807,7 +807,7 @@ static u32 amd_pstate_get_transition_delay_us(unsigned int cpu)
 	return transition_delay_ns / NSEC_PER_USEC;
 }
 
-/**
+/*
  * Get pstate transition latency value from ACPI tables that firmware
  * set instead of using hardcode value directly.
  */
@@ -822,7 +822,7 @@ static u32 amd_pstate_get_transition_latency(unsigned int cpu)
 	return transition_latency;
 }
 
-/**
+/*
  * amd_pstate_init_freq: Initialize the max_freq, min_freq,
  *                       nominal_freq and lowest_nonlinear_freq for
  *                       the @cpudata object.
@@ -843,7 +843,6 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
 	u32 boost_ratio, lowest_nonlinear_ratio;
 	struct cppc_perf_caps cppc_perf;
 
-
 	ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf);
 	if (ret)
 		return ret;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq
  2024-04-30  7:48 [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Perry Yuan
@ 2024-04-30  7:48 ` Perry Yuan
  2024-04-30 10:23 ` [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Perry Yuan @ 2024-04-30  7:48 UTC (permalink / raw
  To: rafael.j.wysocki, Mario.Limonciello, viresh.kumar, gautham.shenoy,
	Borislav.Petkov, Ray.Huang
  Cc: Alexander.Deucher, Xinmei.Huang, oleksandr, Xiaojian.Du, Li.Meng,
	linux-pm, linux-kernel

removed the unused variable `lowest_nonlinear_freq` for build warning.
This variable was defined and assigned a value in the previous code,
but it was not used in the subsequent code.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404271038.em6nJjzy-lkp@intel.com/
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
---
 drivers/cpufreq/amd-pstate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 85656342a101..2db095867d03 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -878,7 +878,7 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
 
 static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
 {
-	int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
+	int min_freq, max_freq, nominal_freq, ret;
 	struct device *dev;
 	struct amd_cpudata *cpudata;
 
@@ -910,7 +910,6 @@ static int amd_pstate_cpu_init(struct cpufreq_policy *policy)
 	min_freq = READ_ONCE(cpudata->min_freq);
 	max_freq = READ_ONCE(cpudata->max_freq);
 	nominal_freq = READ_ONCE(cpudata->nominal_freq);
-	lowest_nonlinear_freq = READ_ONCE(cpudata->lowest_nonlinear_freq);
 
 	if (min_freq <= 0 || max_freq <= 0 ||
 	    nominal_freq <= 0 || min_freq > max_freq) {
@@ -1339,7 +1338,7 @@ static bool amd_pstate_acpi_pm_profile_undefined(void)
 
 static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
 {
-	int min_freq, max_freq, nominal_freq, lowest_nonlinear_freq, ret;
+	int min_freq, max_freq, nominal_freq, ret;
 	struct amd_cpudata *cpudata;
 	struct device *dev;
 	u64 value;
@@ -1373,7 +1372,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
 	min_freq = READ_ONCE(cpudata->min_freq);
 	max_freq = READ_ONCE(cpudata->max_freq);
 	nominal_freq = READ_ONCE(cpudata->nominal_freq);
-	lowest_nonlinear_freq = READ_ONCE(cpudata->lowest_nonlinear_freq);
 	if (min_freq <= 0 || max_freq <= 0 ||
 	    nominal_freq <= 0 || min_freq > max_freq) {
 		dev_err(dev,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] cpufreq: amd-pstate: fix code format problems
  2024-04-30  7:48 [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Perry Yuan
  2024-04-30  7:48 ` [PATCH 2/2] cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq Perry Yuan
@ 2024-04-30 10:23 ` Rafael J. Wysocki
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2024-04-30 10:23 UTC (permalink / raw
  To: Perry Yuan
  Cc: rafael.j.wysocki, Mario.Limonciello, viresh.kumar, gautham.shenoy,
	Borislav.Petkov, Ray.Huang, Alexander.Deucher, Xinmei.Huang,
	oleksandr, Xiaojian.Du, Li.Meng, linux-pm, linux-kernel

On Tue, Apr 30, 2024 at 9:49 AM Perry Yuan <perry.yuan@amd.com> wrote:
>
> get some code format problems fixed in the amd-pstate driver.
>
> Changes Made:
>
> - Fixed incorrect comment format in the functions.
>
> - Removed unnecessary blank line.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202404271148.HK9yHBlB-lkp@intel.com/
> Signed-off-by: Perry Yuan <perry.yuan@amd.com>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

As this is a resend of a patch that has been posted already, it would
be good to indicate that somehow.  For example, send the whole series
as v2 and say in the notes below the changelog that a Reviewed-by tag
has been added between v1 and v2.  And for the second patch, say that
it is new in v2.

That said, this particular case is simple enough for me to see what's
going on right away.

Both patches in the series applied, thanks!

> ---
>  drivers/cpufreq/amd-pstate.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 83a29b257794..85656342a101 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -792,7 +792,7 @@ static void amd_pstate_update_limits(unsigned int cpu)
>         mutex_unlock(&amd_pstate_driver_lock);
>  }
>
> -/**
> +/*
>   * Get pstate transition delay time from ACPI tables that firmware set
>   * instead of using hardcode value directly.
>   */
> @@ -807,7 +807,7 @@ static u32 amd_pstate_get_transition_delay_us(unsigned int cpu)
>         return transition_delay_ns / NSEC_PER_USEC;
>  }
>
> -/**
> +/*
>   * Get pstate transition latency value from ACPI tables that firmware
>   * set instead of using hardcode value directly.
>   */
> @@ -822,7 +822,7 @@ static u32 amd_pstate_get_transition_latency(unsigned int cpu)
>         return transition_latency;
>  }
>
> -/**
> +/*
>   * amd_pstate_init_freq: Initialize the max_freq, min_freq,
>   *                       nominal_freq and lowest_nonlinear_freq for
>   *                       the @cpudata object.
> @@ -843,7 +843,6 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
>         u32 boost_ratio, lowest_nonlinear_ratio;
>         struct cppc_perf_caps cppc_perf;
>
> -
>         ret = cppc_get_perf_caps(cpudata->cpu, &cppc_perf);
>         if (ret)
>                 return ret;
> --
> 2.34.1
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-30 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30  7:48 [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Perry Yuan
2024-04-30  7:48 ` [PATCH 2/2] cpufreq: amd-pstate: remove unused variable lowest_nonlinear_freq Perry Yuan
2024-04-30 10:23 ` [PATCH 1/2] cpufreq: amd-pstate: fix code format problems Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).