All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static
@ 2019-05-29 15:07 YueHaibing
  2019-05-29 15:12 ` Guenter Roeck
  2019-05-30  8:49 ` [PATCH v2 -next] platform/chrome: cros_ec: " YueHaibing
  0 siblings, 2 replies; 6+ messages in thread
From: YueHaibing @ 2019-05-29 15:07 UTC (permalink / raw)
  To: bleung, enric.balletbo, groeck; +Cc: linux-kernel, YueHaibing

Fix sparse warning:

drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
 drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
 drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
 drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
 drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
index 4c2a27f6a6d0..4578eb3e0731 100644
--- a/drivers/platform/chrome/cros_ec_debugfs.c
+++ b/drivers/platform/chrome/cros_ec_debugfs.c
@@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
 				       read_buf, p - read_buf);
 }
 
-const struct file_operations cros_ec_console_log_fops = {
+static const struct file_operations cros_ec_console_log_fops = {
 	.owner = THIS_MODULE,
 	.open = cros_ec_console_log_open,
 	.read = cros_ec_console_log_read,
@@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
 	.release = cros_ec_console_log_release,
 };
 
-const struct file_operations cros_ec_pdinfo_fops = {
+static const struct file_operations cros_ec_pdinfo_fops = {
 	.owner = THIS_MODULE,
 	.open = simple_open,
 	.read = cros_ec_pdinfo_read,
diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index d30a6650b0b5..23a82ee4c785 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
 	NULL,
 };
 
-struct attribute_group cros_ec_lightbar_attr_group = {
+static struct attribute_group cros_ec_lightbar_attr_group = {
 	.name = "lightbar",
 	.attrs = __lb_cmds_attrs,
 };
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index c9c240fbe7c6..aaa21803633a 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
 }
 #endif
 
-const struct dev_pm_ops cros_ec_lpc_pm_ops = {
+static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
 };
 
diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
index fe0b7614ae1b..3edb237bf8ed 100644
--- a/drivers/platform/chrome/cros_ec_sysfs.c
+++ b/drivers/platform/chrome/cros_ec_sysfs.c
@@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
 	return a->mode;
 }
 
-struct attribute_group cros_ec_attr_group = {
+static struct attribute_group cros_ec_attr_group = {
 	.attrs = __ec_attrs,
 	.is_visible = cros_ec_ctrl_visible,
 };
diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
index 8392a1ec33a7..2aaefed87eb4 100644
--- a/drivers/platform/chrome/cros_ec_vbc.c
+++ b/drivers/platform/chrome/cros_ec_vbc.c
@@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
 	NULL
 };
 
-struct attribute_group cros_ec_vbc_attr_group = {
+static struct attribute_group cros_ec_vbc_attr_group = {
 	.name = "vbc",
 	.bin_attrs = cros_ec_vbc_bin_attrs,
 };
-- 
2.17.1



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

* Re: [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static
  2019-05-29 15:07 [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static YueHaibing
@ 2019-05-29 15:12 ` Guenter Roeck
  2019-05-30  8:15   ` Yuehaibing
  2019-05-30  8:49 ` [PATCH v2 -next] platform/chrome: cros_ec: " YueHaibing
  1 sibling, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2019-05-29 15:12 UTC (permalink / raw)
  To: YueHaibing
  Cc: Benson Leung, Enric Balletbo i Serra, Guenter Roeck, linux-kernel

On Wed, May 29, 2019 at 8:08 AM YueHaibing <yuehaibing@huawei.com> wrote:
>
> Fix sparse warning:
>
> drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?
>

The subject is misleading: The patch does not only affect cros_ec_lpc.

Guenter

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
>  drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
>  drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
>  drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
>  drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
> index 4c2a27f6a6d0..4578eb3e0731 100644
> --- a/drivers/platform/chrome/cros_ec_debugfs.c
> +++ b/drivers/platform/chrome/cros_ec_debugfs.c
> @@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
>                                        read_buf, p - read_buf);
>  }
>
> -const struct file_operations cros_ec_console_log_fops = {
> +static const struct file_operations cros_ec_console_log_fops = {
>         .owner = THIS_MODULE,
>         .open = cros_ec_console_log_open,
>         .read = cros_ec_console_log_read,
> @@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
>         .release = cros_ec_console_log_release,
>  };
>
> -const struct file_operations cros_ec_pdinfo_fops = {
> +static const struct file_operations cros_ec_pdinfo_fops = {
>         .owner = THIS_MODULE,
>         .open = simple_open,
>         .read = cros_ec_pdinfo_read,
> diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
> index d30a6650b0b5..23a82ee4c785 100644
> --- a/drivers/platform/chrome/cros_ec_lightbar.c
> +++ b/drivers/platform/chrome/cros_ec_lightbar.c
> @@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
>         NULL,
>  };
>
> -struct attribute_group cros_ec_lightbar_attr_group = {
> +static struct attribute_group cros_ec_lightbar_attr_group = {
>         .name = "lightbar",
>         .attrs = __lb_cmds_attrs,
>  };
> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
> index c9c240fbe7c6..aaa21803633a 100644
> --- a/drivers/platform/chrome/cros_ec_lpc.c
> +++ b/drivers/platform/chrome/cros_ec_lpc.c
> @@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
>  }
>  #endif
>
> -const struct dev_pm_ops cros_ec_lpc_pm_ops = {
> +static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>         SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
>  };
>
> diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
> index fe0b7614ae1b..3edb237bf8ed 100644
> --- a/drivers/platform/chrome/cros_ec_sysfs.c
> +++ b/drivers/platform/chrome/cros_ec_sysfs.c
> @@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
>         return a->mode;
>  }
>
> -struct attribute_group cros_ec_attr_group = {
> +static struct attribute_group cros_ec_attr_group = {
>         .attrs = __ec_attrs,
>         .is_visible = cros_ec_ctrl_visible,
>  };
> diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
> index 8392a1ec33a7..2aaefed87eb4 100644
> --- a/drivers/platform/chrome/cros_ec_vbc.c
> +++ b/drivers/platform/chrome/cros_ec_vbc.c
> @@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
>         NULL
>  };
>
> -struct attribute_group cros_ec_vbc_attr_group = {
> +static struct attribute_group cros_ec_vbc_attr_group = {
>         .name = "vbc",
>         .bin_attrs = cros_ec_vbc_bin_attrs,
>  };
> --
> 2.17.1
>
>

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

* Re: [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static
  2019-05-29 15:12 ` Guenter Roeck
@ 2019-05-30  8:15   ` Yuehaibing
  0 siblings, 0 replies; 6+ messages in thread
From: Yuehaibing @ 2019-05-30  8:15 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Benson Leung, Enric Balletbo i Serra, Guenter Roeck, linux-kernel

On 2019/5/29 23:12, Guenter Roeck wrote:
> On Wed, May 29, 2019 at 8:08 AM YueHaibing <yuehaibing@huawei.com> wrote:
>>
>> Fix sparse warning:
>>
>> drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?
>>
> 
> The subject is misleading: The patch does not only affect cros_ec_lpc.

Sorry, will fix it in v2.

> 
> Guenter
> 
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
>>  drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
>>  drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
>>  drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
>>  drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
>>  5 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
>> index 4c2a27f6a6d0..4578eb3e0731 100644
>> --- a/drivers/platform/chrome/cros_ec_debugfs.c
>> +++ b/drivers/platform/chrome/cros_ec_debugfs.c
>> @@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
>>                                        read_buf, p - read_buf);
>>  }
>>
>> -const struct file_operations cros_ec_console_log_fops = {
>> +static const struct file_operations cros_ec_console_log_fops = {
>>         .owner = THIS_MODULE,
>>         .open = cros_ec_console_log_open,
>>         .read = cros_ec_console_log_read,
>> @@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
>>         .release = cros_ec_console_log_release,
>>  };
>>
>> -const struct file_operations cros_ec_pdinfo_fops = {
>> +static const struct file_operations cros_ec_pdinfo_fops = {
>>         .owner = THIS_MODULE,
>>         .open = simple_open,
>>         .read = cros_ec_pdinfo_read,
>> diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
>> index d30a6650b0b5..23a82ee4c785 100644
>> --- a/drivers/platform/chrome/cros_ec_lightbar.c
>> +++ b/drivers/platform/chrome/cros_ec_lightbar.c
>> @@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
>>         NULL,
>>  };
>>
>> -struct attribute_group cros_ec_lightbar_attr_group = {
>> +static struct attribute_group cros_ec_lightbar_attr_group = {
>>         .name = "lightbar",
>>         .attrs = __lb_cmds_attrs,
>>  };
>> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
>> index c9c240fbe7c6..aaa21803633a 100644
>> --- a/drivers/platform/chrome/cros_ec_lpc.c
>> +++ b/drivers/platform/chrome/cros_ec_lpc.c
>> @@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
>>  }
>>  #endif
>>
>> -const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>> +static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>>         SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
>>  };
>>
>> diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
>> index fe0b7614ae1b..3edb237bf8ed 100644
>> --- a/drivers/platform/chrome/cros_ec_sysfs.c
>> +++ b/drivers/platform/chrome/cros_ec_sysfs.c
>> @@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
>>         return a->mode;
>>  }
>>
>> -struct attribute_group cros_ec_attr_group = {
>> +static struct attribute_group cros_ec_attr_group = {
>>         .attrs = __ec_attrs,
>>         .is_visible = cros_ec_ctrl_visible,
>>  };
>> diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
>> index 8392a1ec33a7..2aaefed87eb4 100644
>> --- a/drivers/platform/chrome/cros_ec_vbc.c
>> +++ b/drivers/platform/chrome/cros_ec_vbc.c
>> @@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
>>         NULL
>>  };
>>
>> -struct attribute_group cros_ec_vbc_attr_group = {
>> +static struct attribute_group cros_ec_vbc_attr_group = {
>>         .name = "vbc",
>>         .bin_attrs = cros_ec_vbc_bin_attrs,
>>  };
>> --
>> 2.17.1
>>
>>
> 
> .
> 


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

* [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static
  2019-05-29 15:07 [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static YueHaibing
  2019-05-29 15:12 ` Guenter Roeck
@ 2019-05-30  8:49 ` YueHaibing
  2019-05-30 17:53   ` Benson Leung
  1 sibling, 1 reply; 6+ messages in thread
From: YueHaibing @ 2019-05-30  8:49 UTC (permalink / raw)
  To: bleung, enric.balletbo, groeck; +Cc: linux-kernel, YueHaibing

Fix sparse warning:

drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: fix patch title
---
 drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
 drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
 drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
 drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
 drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
index 4c2a27f6a6d0..4578eb3e0731 100644
--- a/drivers/platform/chrome/cros_ec_debugfs.c
+++ b/drivers/platform/chrome/cros_ec_debugfs.c
@@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
 				       read_buf, p - read_buf);
 }
 
-const struct file_operations cros_ec_console_log_fops = {
+static const struct file_operations cros_ec_console_log_fops = {
 	.owner = THIS_MODULE,
 	.open = cros_ec_console_log_open,
 	.read = cros_ec_console_log_read,
@@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
 	.release = cros_ec_console_log_release,
 };
 
-const struct file_operations cros_ec_pdinfo_fops = {
+static const struct file_operations cros_ec_pdinfo_fops = {
 	.owner = THIS_MODULE,
 	.open = simple_open,
 	.read = cros_ec_pdinfo_read,
diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index d30a6650b0b5..23a82ee4c785 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
 	NULL,
 };
 
-struct attribute_group cros_ec_lightbar_attr_group = {
+static struct attribute_group cros_ec_lightbar_attr_group = {
 	.name = "lightbar",
 	.attrs = __lb_cmds_attrs,
 };
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index c9c240fbe7c6..aaa21803633a 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
 }
 #endif
 
-const struct dev_pm_ops cros_ec_lpc_pm_ops = {
+static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
 	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
 };
 
diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
index fe0b7614ae1b..3edb237bf8ed 100644
--- a/drivers/platform/chrome/cros_ec_sysfs.c
+++ b/drivers/platform/chrome/cros_ec_sysfs.c
@@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
 	return a->mode;
 }
 
-struct attribute_group cros_ec_attr_group = {
+static struct attribute_group cros_ec_attr_group = {
 	.attrs = __ec_attrs,
 	.is_visible = cros_ec_ctrl_visible,
 };
diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
index 8392a1ec33a7..2aaefed87eb4 100644
--- a/drivers/platform/chrome/cros_ec_vbc.c
+++ b/drivers/platform/chrome/cros_ec_vbc.c
@@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
 	NULL
 };
 
-struct attribute_group cros_ec_vbc_attr_group = {
+static struct attribute_group cros_ec_vbc_attr_group = {
 	.name = "vbc",
 	.bin_attrs = cros_ec_vbc_bin_attrs,
 };
-- 
2.17.1



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

* Re: [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static
  2019-05-30  8:49 ` [PATCH v2 -next] platform/chrome: cros_ec: " YueHaibing
@ 2019-05-30 17:53   ` Benson Leung
  2019-06-06 10:21     ` Enric Balletbo i Serra
  0 siblings, 1 reply; 6+ messages in thread
From: Benson Leung @ 2019-05-30 17:53 UTC (permalink / raw)
  To: YueHaibing; +Cc: bleung, enric.balletbo, groeck, linux-kernel, bleung

[-- Attachment #1: Type: text/plain, Size: 4640 bytes --]

Hello YueHaibing,

On Thu, May 30, 2019 at 04:49:32PM +0800, YueHaibing wrote:
> Fix sparse warning:
> 
> drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
> drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Reviewed-by: Benson Leung <bleung@chromium.org>

> ---
> v2: fix patch title
> ---
>  drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
>  drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
>  drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
>  drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
>  drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
> index 4c2a27f6a6d0..4578eb3e0731 100644
> --- a/drivers/platform/chrome/cros_ec_debugfs.c
> +++ b/drivers/platform/chrome/cros_ec_debugfs.c
> @@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
>  				       read_buf, p - read_buf);
>  }
>  
> -const struct file_operations cros_ec_console_log_fops = {
> +static const struct file_operations cros_ec_console_log_fops = {
>  	.owner = THIS_MODULE,
>  	.open = cros_ec_console_log_open,
>  	.read = cros_ec_console_log_read,
> @@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
>  	.release = cros_ec_console_log_release,
>  };
>  
> -const struct file_operations cros_ec_pdinfo_fops = {
> +static const struct file_operations cros_ec_pdinfo_fops = {
>  	.owner = THIS_MODULE,
>  	.open = simple_open,
>  	.read = cros_ec_pdinfo_read,
> diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
> index d30a6650b0b5..23a82ee4c785 100644
> --- a/drivers/platform/chrome/cros_ec_lightbar.c
> +++ b/drivers/platform/chrome/cros_ec_lightbar.c
> @@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
>  	NULL,
>  };
>  
> -struct attribute_group cros_ec_lightbar_attr_group = {
> +static struct attribute_group cros_ec_lightbar_attr_group = {
>  	.name = "lightbar",
>  	.attrs = __lb_cmds_attrs,
>  };
> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
> index c9c240fbe7c6..aaa21803633a 100644
> --- a/drivers/platform/chrome/cros_ec_lpc.c
> +++ b/drivers/platform/chrome/cros_ec_lpc.c
> @@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
>  }
>  #endif
>  
> -const struct dev_pm_ops cros_ec_lpc_pm_ops = {
> +static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>  	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
>  };
>  
> diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
> index fe0b7614ae1b..3edb237bf8ed 100644
> --- a/drivers/platform/chrome/cros_ec_sysfs.c
> +++ b/drivers/platform/chrome/cros_ec_sysfs.c
> @@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
>  	return a->mode;
>  }
>  
> -struct attribute_group cros_ec_attr_group = {
> +static struct attribute_group cros_ec_attr_group = {
>  	.attrs = __ec_attrs,
>  	.is_visible = cros_ec_ctrl_visible,
>  };
> diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
> index 8392a1ec33a7..2aaefed87eb4 100644
> --- a/drivers/platform/chrome/cros_ec_vbc.c
> +++ b/drivers/platform/chrome/cros_ec_vbc.c
> @@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
>  	NULL
>  };
>  
> -struct attribute_group cros_ec_vbc_attr_group = {
> +static struct attribute_group cros_ec_vbc_attr_group = {
>  	.name = "vbc",
>  	.bin_attrs = cros_ec_vbc_bin_attrs,
>  };
> -- 
> 2.17.1
> 
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static
  2019-05-30 17:53   ` Benson Leung
@ 2019-06-06 10:21     ` Enric Balletbo i Serra
  0 siblings, 0 replies; 6+ messages in thread
From: Enric Balletbo i Serra @ 2019-06-06 10:21 UTC (permalink / raw)
  To: Benson Leung, YueHaibing; +Cc: bleung, groeck, linux-kernel



On 30/5/19 19:53, Benson Leung wrote:
> Hello YueHaibing,
> 
> On Thu, May 30, 2019 at 04:49:32PM +0800, YueHaibing wrote:
>> Fix sparse warning:
>>
>> drivers/platform/chrome/cros_ec_debugfs.c:256:30: warning: symbol 'cros_ec_console_log_fops' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_debugfs.c:265:30: warning: symbol 'cros_ec_pdinfo_fops' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_lightbar.c:550:24: warning: symbol 'cros_ec_lightbar_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_sysfs.c:338:24: warning: symbol 'cros_ec_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_vbc.c:104:24: warning: symbol 'cros_ec_vbc_attr_group' was not declared. Should it be static?
>> drivers/platform/chrome/cros_ec_lpc.c:408:25: warning: symbol 'cros_ec_lpc_pm_ops' was not declared. Should it be static?
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> 
> Reviewed-by: Benson Leung <bleung@chromium.org>

applied for 5.3

Thanks,
 Enric

> 
>> ---
>> v2: fix patch title
>> ---
>>  drivers/platform/chrome/cros_ec_debugfs.c  | 4 ++--
>>  drivers/platform/chrome/cros_ec_lightbar.c | 2 +-
>>  drivers/platform/chrome/cros_ec_lpc.c      | 2 +-
>>  drivers/platform/chrome/cros_ec_sysfs.c    | 2 +-
>>  drivers/platform/chrome/cros_ec_vbc.c      | 2 +-
>>  5 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c
>> index 4c2a27f6a6d0..4578eb3e0731 100644
>> --- a/drivers/platform/chrome/cros_ec_debugfs.c
>> +++ b/drivers/platform/chrome/cros_ec_debugfs.c
>> @@ -241,7 +241,7 @@ static ssize_t cros_ec_pdinfo_read(struct file *file,
>>  				       read_buf, p - read_buf);
>>  }
>>  
>> -const struct file_operations cros_ec_console_log_fops = {
>> +static const struct file_operations cros_ec_console_log_fops = {
>>  	.owner = THIS_MODULE,
>>  	.open = cros_ec_console_log_open,
>>  	.read = cros_ec_console_log_read,
>> @@ -250,7 +250,7 @@ const struct file_operations cros_ec_console_log_fops = {
>>  	.release = cros_ec_console_log_release,
>>  };
>>  
>> -const struct file_operations cros_ec_pdinfo_fops = {
>> +static const struct file_operations cros_ec_pdinfo_fops = {
>>  	.owner = THIS_MODULE,
>>  	.open = simple_open,
>>  	.read = cros_ec_pdinfo_read,
>> diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
>> index d30a6650b0b5..23a82ee4c785 100644
>> --- a/drivers/platform/chrome/cros_ec_lightbar.c
>> +++ b/drivers/platform/chrome/cros_ec_lightbar.c
>> @@ -547,7 +547,7 @@ static struct attribute *__lb_cmds_attrs[] = {
>>  	NULL,
>>  };
>>  
>> -struct attribute_group cros_ec_lightbar_attr_group = {
>> +static struct attribute_group cros_ec_lightbar_attr_group = {
>>  	.name = "lightbar",
>>  	.attrs = __lb_cmds_attrs,
>>  };
>> diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
>> index c9c240fbe7c6..aaa21803633a 100644
>> --- a/drivers/platform/chrome/cros_ec_lpc.c
>> +++ b/drivers/platform/chrome/cros_ec_lpc.c
>> @@ -405,7 +405,7 @@ static int cros_ec_lpc_resume(struct device *dev)
>>  }
>>  #endif
>>  
>> -const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>> +static const struct dev_pm_ops cros_ec_lpc_pm_ops = {
>>  	SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_lpc_suspend, cros_ec_lpc_resume)
>>  };
>>  
>> diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/chrome/cros_ec_sysfs.c
>> index fe0b7614ae1b..3edb237bf8ed 100644
>> --- a/drivers/platform/chrome/cros_ec_sysfs.c
>> +++ b/drivers/platform/chrome/cros_ec_sysfs.c
>> @@ -335,7 +335,7 @@ static umode_t cros_ec_ctrl_visible(struct kobject *kobj,
>>  	return a->mode;
>>  }
>>  
>> -struct attribute_group cros_ec_attr_group = {
>> +static struct attribute_group cros_ec_attr_group = {
>>  	.attrs = __ec_attrs,
>>  	.is_visible = cros_ec_ctrl_visible,
>>  };
>> diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chrome/cros_ec_vbc.c
>> index 8392a1ec33a7..2aaefed87eb4 100644
>> --- a/drivers/platform/chrome/cros_ec_vbc.c
>> +++ b/drivers/platform/chrome/cros_ec_vbc.c
>> @@ -101,7 +101,7 @@ static struct bin_attribute *cros_ec_vbc_bin_attrs[] = {
>>  	NULL
>>  };
>>  
>> -struct attribute_group cros_ec_vbc_attr_group = {
>> +static struct attribute_group cros_ec_vbc_attr_group = {
>>  	.name = "vbc",
>>  	.bin_attrs = cros_ec_vbc_bin_attrs,
>>  };
>> -- 
>> 2.17.1
>>
>>
> 

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

end of thread, other threads:[~2019-06-06 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 15:07 [PATCH -next] platform/chrome: cros_ec_lpc: Make some symbols static YueHaibing
2019-05-29 15:12 ` Guenter Roeck
2019-05-30  8:15   ` Yuehaibing
2019-05-30  8:49 ` [PATCH v2 -next] platform/chrome: cros_ec: " YueHaibing
2019-05-30 17:53   ` Benson Leung
2019-06-06 10:21     ` Enric Balletbo i Serra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.