Skip to contentSkip to conversation

platform/chrome: cros_ec_lpc: Make some symbols static

PATCH Superseded YueHaibing 4 participants 6 messages May 29, 2019 – Jun 6, 2019

Subsystems (2)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_lpc: Make some symbols static

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?

---
 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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -1
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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,
 };
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · 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?

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

Guenter

Quoted 88 lines
---
 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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -2
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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

author
#2 lore raw
Quoted 12 lines · Guenter Roeck
Quoted 10 lines · 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?

Quoted 1 line

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

Sorry, will fix it in v2.

Quoted 94 lines

Guenter

Quoted 85 lines
---
 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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -2
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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,
 };
--
Quoted 3 lines

2.17.1

.

author
#3 lore raw

PATCH v2 1/1 platform/chrome: cros_ec: Make some symbols static

In reply to 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?

---
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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -1
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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,
 };
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#4 lore raw

Re: [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static

Hello YueHaibing,

Quoted 11 lines · 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?

Quoted 88 lines

---
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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -1
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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,
 };
Signature · 1 line
2.17.1
Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]
#5 lore raw

Re: [PATCH v2 -next] platform/chrome: cros_ec: Make some symbols static

Quoted 12 lines · Benson Leung

Hello YueHaibing,

Quoted 9 lines · 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?

Quoted 4 lines
Quoted 2 lines

applied for 5.3

Thanks,
Enric

Quoted 90 lines
Quoted 89 lines

---
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(-)
drivers/platform/chrome/cros_ec_debugfs.c +2 -2
index 4c2a27f6a6d0..4578eb3e0731 100644
@@ -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,
drivers/platform/chrome/cros_ec_lightbar.c +1 -1
index d30a6650b0b5..23a82ee4c785 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_lpc.c +1 -1
index c9c240fbe7c6..aaa21803633a 100644
@@ -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)
 };
 
drivers/platform/chrome/cros_ec_sysfs.c +1 -1
index fe0b7614ae1b..3edb237bf8ed 100644
@@ -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,
 };
drivers/platform/chrome/cros_ec_vbc.c +1 -1
index 8392a1ec33a7..2aaefed87eb4 100644
@@ -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,
 };
Signature · 1 line
2.17.1