diff mbox

[next] platform/x86: intel_cht_int33fe: make a couple of local functions static

Message ID 20171011093010.17173-1-colin.king@canonical.com (mailing list archive)
State Accepted, archived
Delegated to: Andy Shevchenko
Headers show

Commit Message

Colin King Oct. 11, 2017, 9:30 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047
are local to the source and do not need to be in global scope, so make
them static.

Cleans up sparse warnings:
symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be
static?
symbol 'cht_int33fe_find_max17047' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/platform/x86/intel_cht_int33fe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko Oct. 12, 2017, 8:36 p.m. UTC | #1
+Cc: Hans

On Wed, Oct 11, 2017 at 12:30 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047
> are local to the source and do not need to be in global scope, so make
> them static.
>
> Cleans up sparse warnings:
> symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be
> static?
> symbol 'cht_int33fe_find_max17047' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/platform/x86/intel_cht_int33fe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
> index 94716b2fbc00..286c6207765d 100644
> --- a/drivers/platform/x86/intel_cht_int33fe.c
> +++ b/drivers/platform/x86/intel_cht_int33fe.c
> @@ -42,7 +42,7 @@ struct cht_int33fe_data {
>   * These helpers are used to work around this by checking if an i2c-client
>   * for the max17047 has already been registered.
>   */
> -int cht_int33fe_check_for_max17047(struct device *dev, void *data)
> +static int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>  {
>         struct i2c_client **max17047 = data;
>         struct acpi_device *adev;
> @@ -62,7 +62,7 @@ int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>         return 1;
>  }
>
> -struct i2c_client *cht_int33fe_find_max17047(void)
> +static struct i2c_client *cht_int33fe_find_max17047(void)
>  {
>         struct i2c_client *max17047 = NULL;
>
> --
> 2.14.1
>
Hans de Goede Oct. 13, 2017, 1:52 p.m. UTC | #2
Hi,

On 12-10-17 22:36, Andy Shevchenko wrote:
> +Cc: Hans
> 
> On Wed, Oct 11, 2017 at 12:30 PM, Colin King <colin.king@canonical.com> wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047
>> are local to the source and do not need to be in global scope, so make
>> them static.
>>
>> Cleans up sparse warnings:
>> symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be
>> static?
>> symbol 'cht_int33fe_find_max17047' was not declared. Should it be static?
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch looks good to me, thank you for catching this:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



>> ---
>>   drivers/platform/x86/intel_cht_int33fe.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
>> index 94716b2fbc00..286c6207765d 100644
>> --- a/drivers/platform/x86/intel_cht_int33fe.c
>> +++ b/drivers/platform/x86/intel_cht_int33fe.c
>> @@ -42,7 +42,7 @@ struct cht_int33fe_data {
>>    * These helpers are used to work around this by checking if an i2c-client
>>    * for the max17047 has already been registered.
>>    */
>> -int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>> +static int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>>   {
>>          struct i2c_client **max17047 = data;
>>          struct acpi_device *adev;
>> @@ -62,7 +62,7 @@ int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>>          return 1;
>>   }
>>
>> -struct i2c_client *cht_int33fe_find_max17047(void)
>> +static struct i2c_client *cht_int33fe_find_max17047(void)
>>   {
>>          struct i2c_client *max17047 = NULL;
>>
>> --
>> 2.14.1
>>
> 
> 
>
Andy Shevchenko Oct. 14, 2017, 1:51 p.m. UTC | #3
On Wed, Oct 11, 2017 at 12:30 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The functions cht_int33fe_check_for_max17047 and cht_int33fe_find_max17047
> are local to the source and do not need to be in global scope, so make
> them static.
>
> Cleans up sparse warnings:
> symbol 'cht_int33fe_check_for_max17047' was not declared. Should it be
> static?
> symbol 'cht_int33fe_find_max17047' was not declared. Should it be static?

Pushed to my review queue, thanks!

>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/platform/x86/intel_cht_int33fe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
> index 94716b2fbc00..286c6207765d 100644
> --- a/drivers/platform/x86/intel_cht_int33fe.c
> +++ b/drivers/platform/x86/intel_cht_int33fe.c
> @@ -42,7 +42,7 @@ struct cht_int33fe_data {
>   * These helpers are used to work around this by checking if an i2c-client
>   * for the max17047 has already been registered.
>   */
> -int cht_int33fe_check_for_max17047(struct device *dev, void *data)
> +static int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>  {
>         struct i2c_client **max17047 = data;
>         struct acpi_device *adev;
> @@ -62,7 +62,7 @@ int cht_int33fe_check_for_max17047(struct device *dev, void *data)
>         return 1;
>  }
>
> -struct i2c_client *cht_int33fe_find_max17047(void)
> +static struct i2c_client *cht_int33fe_find_max17047(void)
>  {
>         struct i2c_client *max17047 = NULL;
>
> --
> 2.14.1
>
diff mbox

Patch

diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
index 94716b2fbc00..286c6207765d 100644
--- a/drivers/platform/x86/intel_cht_int33fe.c
+++ b/drivers/platform/x86/intel_cht_int33fe.c
@@ -42,7 +42,7 @@  struct cht_int33fe_data {
  * These helpers are used to work around this by checking if an i2c-client
  * for the max17047 has already been registered.
  */
-int cht_int33fe_check_for_max17047(struct device *dev, void *data)
+static int cht_int33fe_check_for_max17047(struct device *dev, void *data)
 {
 	struct i2c_client **max17047 = data;
 	struct acpi_device *adev;
@@ -62,7 +62,7 @@  int cht_int33fe_check_for_max17047(struct device *dev, void *data)
 	return 1;
 }
 
-struct i2c_client *cht_int33fe_find_max17047(void)
+static struct i2c_client *cht_int33fe_find_max17047(void)
 {
 	struct i2c_client *max17047 = NULL;