diff mbox series

platform/x86/amd/pmf: Fix compiler warnings in static slider

Message ID 20230516074531.2885235-1-Shyam-sundar.S-k@amd.com (mailing list archive)
State Accepted, archived
Headers show
Series platform/x86/amd/pmf: Fix compiler warnings in static slider | expand

Commit Message

Shyam Sundar S K May 16, 2023, 7:45 a.m. UTC
This patch fixes warnings with -Wmissing-prototypes:

warning: no previous prototype for 'source_as_str' [-Wmissing-prototypes]
warning: no previous prototype for 'slider_as_str' [-Wmissing-prototypes]

Fixes: a82ebb3d800d ("platform/x86/amd/pmf: Add PMF acpi debug support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305160220.REQc5T2y-lkp@intel.com/
Suggested-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd/pmf/sps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ilpo Järvinen May 16, 2023, 8:20 a.m. UTC | #1
On Tue, 16 May 2023, Shyam Sundar S K wrote:

> This patch fixes warnings with -Wmissing-prototypes:
> 
> warning: no previous prototype for 'source_as_str' [-Wmissing-prototypes]
> warning: no previous prototype for 'slider_as_str' [-Wmissing-prototypes]
> 
> Fixes: a82ebb3d800d ("platform/x86/amd/pmf: Add PMF acpi debug support")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202305160220.REQc5T2y-lkp@intel.com/
> Suggested-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
>  drivers/platform/x86/amd/pmf/sps.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/amd/pmf/sps.c b/drivers/platform/x86/amd/pmf/sps.c
> index 0a4d0549ea03..445ff053b4df 100644
> --- a/drivers/platform/x86/amd/pmf/sps.c
> +++ b/drivers/platform/x86/amd/pmf/sps.c
> @@ -13,7 +13,7 @@
>  static struct amd_pmf_static_slider_granular config_store;
>  
>  #ifdef CONFIG_AMD_PMF_DEBUG
> -const char *slider_as_str(unsigned int state)
> +static const char *slider_as_str(unsigned int state)
>  {
>  	switch (state) {
>  	case POWER_MODE_PERFORMANCE:
> @@ -27,7 +27,7 @@ const char *slider_as_str(unsigned int state)
>  	}
>  }
>  
> -const char *source_as_str(unsigned int state)
> +static const char *source_as_str(unsigned int state)
>  {
>  	switch (state) {
>  	case POWER_SOURCE_AC:
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Hans de Goede May 16, 2023, 8:37 a.m. UTC | #2
Hi,

On 5/16/23 10:20, Ilpo Järvinen wrote:
> On Tue, 16 May 2023, Shyam Sundar S K wrote:
> 
>> This patch fixes warnings with -Wmissing-prototypes:
>>
>> warning: no previous prototype for 'source_as_str' [-Wmissing-prototypes]
>> warning: no previous prototype for 'slider_as_str' [-Wmissing-prototypes]
>>
>> Fixes: a82ebb3d800d ("platform/x86/amd/pmf: Add PMF acpi debug support")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202305160220.REQc5T2y-lkp@intel.com/
>> Suggested-by: Patil Rajesh Reddy <Patil.Reddy@amd.com>
>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
>> ---
>>  drivers/platform/x86/amd/pmf/sps.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/amd/pmf/sps.c b/drivers/platform/x86/amd/pmf/sps.c
>> index 0a4d0549ea03..445ff053b4df 100644
>> --- a/drivers/platform/x86/amd/pmf/sps.c
>> +++ b/drivers/platform/x86/amd/pmf/sps.c
>> @@ -13,7 +13,7 @@
>>  static struct amd_pmf_static_slider_granular config_store;
>>  
>>  #ifdef CONFIG_AMD_PMF_DEBUG
>> -const char *slider_as_str(unsigned int state)
>> +static const char *slider_as_str(unsigned int state)
>>  {
>>  	switch (state) {
>>  	case POWER_MODE_PERFORMANCE:
>> @@ -27,7 +27,7 @@ const char *slider_as_str(unsigned int state)
>>  	}
>>  }
>>  
>> -const char *source_as_str(unsigned int state)
>> +static const char *source_as_str(unsigned int state)
>>  {
>>  	switch (state) {
>>  	case POWER_SOURCE_AC:
>>
> 
> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans
diff mbox series

Patch

diff --git a/drivers/platform/x86/amd/pmf/sps.c b/drivers/platform/x86/amd/pmf/sps.c
index 0a4d0549ea03..445ff053b4df 100644
--- a/drivers/platform/x86/amd/pmf/sps.c
+++ b/drivers/platform/x86/amd/pmf/sps.c
@@ -13,7 +13,7 @@ 
 static struct amd_pmf_static_slider_granular config_store;
 
 #ifdef CONFIG_AMD_PMF_DEBUG
-const char *slider_as_str(unsigned int state)
+static const char *slider_as_str(unsigned int state)
 {
 	switch (state) {
 	case POWER_MODE_PERFORMANCE:
@@ -27,7 +27,7 @@  const char *slider_as_str(unsigned int state)
 	}
 }
 
-const char *source_as_str(unsigned int state)
+static const char *source_as_str(unsigned int state)
 {
 	switch (state) {
 	case POWER_SOURCE_AC: