platform/chrome: cros_ec: Make some symbols static
authorYueHaibing <yuehaibing@huawei.com>
Thu, 30 May 2019 08:49:32 +0000 (16:49 +0800)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>
Wed, 5 Jun 2019 15:28:53 +0000 (17:28 +0200)
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>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
drivers/platform/chrome/cros_ec_debugfs.c
drivers/platform/chrome/cros_ec_lightbar.c
drivers/platform/chrome/cros_ec_lpc.c
drivers/platform/chrome/cros_ec_sysfs.c
drivers/platform/chrome/cros_ec_vbc.c

index 4c2a27f6a6d09c5886e5e9dbe9b747f6204b61cd..4578eb3e0731f93c08ea1566ca520bc0e6eff8ef 100644 (file)
@@ -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,
index d30a6650b0b5591c6a691d303da86af2aa7ef4f0..23a82ee4c785bc82492be1c2243e0cb47f9b5e22 100644 (file)
@@ -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,
 };
index c9c240fbe7c63c083356f00eb56982923388ae87..aaa21803633a78857a19ff3d9123a81f6da9a12f 100644 (file)
@@ -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)
 };
 
index fe0b7614ae1b408647cc6d93e34cdfb0dcdc5f8f..3edb237bf8ed0469169cfd511f6728ad92a26221 100644 (file)
@@ -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,
 };
index 8392a1ec33a7faec1a1fe0b013cfebacf8f8b8ba..2aaefed87eb43f8c7582ce595a3b2500830e1895 100644 (file)
@@ -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,
 };