[Resend,8/8] tools/power x86_energy_perf_policy: change intel msr functions to be static

Message ID 6905c6ca13c5cbb513f2bf6c2a937dd228e3fd57.1706592301.git.perry.yuan@amd.com
State New
Headers
Series enable x86_energy_perf_policy for AMD CPU |

Commit Message

Yuan, Perry Jan. 30, 2024, 5:56 a.m. UTC
  change the intel_get_msr and intel_put_msr functions to be static.

No functional change intended.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
---
 .../power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Mario Limonciello Jan. 30, 2024, 7:55 p.m. UTC | #1
On 1/29/2024 23:56, Perry Yuan wrote:
> change the intel_get_msr and intel_put_msr functions to be static.

Was this wrong from the beginning, or is it because of changes in your 
series?  You already have the "what" in the title.  I think the "why" 
should be described here.

> 
> No functional change intended.
> 
> Signed-off-by: Perry Yuan <perry.yuan@amd.com>
> ---
>   .../power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
> index 845cfedab06e..a5f2f96fa383 100644
> --- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
> +++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
> @@ -686,7 +686,7 @@ void err_on_hypervisor(void)
>   		    "not supported on this virtual machine");
>   }
>   
> -int intel_get_msr(int cpu, int offset, unsigned long long *msr)
> +static int intel_get_msr(int cpu, int offset, unsigned long long *msr)
>   {
>   	int retval;
>   	char pathname[32];
> @@ -710,7 +710,7 @@ int intel_get_msr(int cpu, int offset, unsigned long long *msr)
>   	return 0;
>   }
>   
> -int intel_put_msr(int cpu, int offset, unsigned long long new_msr)
> +static int intel_put_msr(int cpu, int offset, unsigned long long new_msr)
>   {
>   	char pathname[32];
>   	int retval;
  

Patch

diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 845cfedab06e..a5f2f96fa383 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -686,7 +686,7 @@  void err_on_hypervisor(void)
 		    "not supported on this virtual machine");
 }
 
-int intel_get_msr(int cpu, int offset, unsigned long long *msr)
+static int intel_get_msr(int cpu, int offset, unsigned long long *msr)
 {
 	int retval;
 	char pathname[32];
@@ -710,7 +710,7 @@  int intel_get_msr(int cpu, int offset, unsigned long long *msr)
 	return 0;
 }
 
-int intel_put_msr(int cpu, int offset, unsigned long long new_msr)
+static int intel_put_msr(int cpu, int offset, unsigned long long new_msr)
 {
 	char pathname[32];
 	int retval;