]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
regulator: bd718x7: Make some variable static
authorYueHaibing <yuehaibing@huawei.com>
Thu, 10 Sep 2020 03:42:40 +0000 (11:42 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 10 Sep 2020 12:50:30 +0000 (13:50 +0100)
Fix sparse warnings:

drivers/regulator/bd718x7-regulator.c:576:28: warning: symbol 'bd71847_swcontrol_ops' was not declared. Should it be static?
drivers/regulator/bd718x7-regulator.c:585:28: warning: symbol 'bd71847_hwcontrol_ops' was not declared. Should it be static?
drivers/regulator/bd718x7-regulator.c:902:28: warning: symbol 'bd71837_swcontrol_ops' was not declared. Should it be static?
drivers/regulator/bd718x7-regulator.c:913:28: warning: symbol 'bd71837_hwcontrol_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20200910034240.37268-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/bd718x7-regulator.c

index 159c917b9c4ca48e7bd43c5ac9d453e09fea4d44..0774467994fbe26c18768abca90b213269452e53 100644 (file)
@@ -573,7 +573,7 @@ static int buck_set_hw_dvs_levels(struct device_node *np,
        return rohm_regulator_set_dvs_levels(&data->dvs, np, desc, cfg->regmap);
 }
 
-const struct regulator_ops *bd71847_swcontrol_ops[] = {
+static const struct regulator_ops *bd71847_swcontrol_ops[] = {
        &bd718xx_dvs_buck_regulator_ops, &bd718xx_dvs_buck_regulator_ops,
        &bd718xx_pickable_range_buck_ops, &bd718xx_pickable_range_buck_ops,
        &bd718xx_buck_regulator_nolinear_ops, &bd718xx_buck_regulator_ops,
@@ -582,7 +582,7 @@ const struct regulator_ops *bd71847_swcontrol_ops[] = {
        &bd718xx_pickable_range_ldo_ops, &bd718xx_ldo_regulator_ops,
 };
 
-const struct regulator_ops *bd71847_hwcontrol_ops[] = {
+static const struct regulator_ops *bd71847_hwcontrol_ops[] = {
        &BD718XX_HWOPNAME(bd718xx_dvs_buck_regulator_ops),
        &BD718XX_HWOPNAME(bd718xx_dvs_buck_regulator_ops),
        &BD718XX_HWOPNAME(bd718xx_pickable_range_buck_ops),
@@ -899,7 +899,7 @@ static struct bd718xx_regulator_data bd71847_regulators[] = {
        },
 };
 
-const struct regulator_ops *bd71837_swcontrol_ops[] = {
+static const struct regulator_ops *bd71837_swcontrol_ops[] = {
        &bd718xx_dvs_buck_regulator_ops, &bd718xx_dvs_buck_regulator_ops,
        &bd718xx_dvs_buck_regulator_ops, &bd718xx_dvs_buck_regulator_ops,
        &bd71837_pickable_range_buck_ops, &bd71837_buck_regulator_ops,
@@ -910,7 +910,7 @@ const struct regulator_ops *bd71837_swcontrol_ops[] = {
        &bd71837_ldo_regulator_ops,
 };
 
-const struct regulator_ops *bd71837_hwcontrol_ops[] = {
+static const struct regulator_ops *bd71837_hwcontrol_ops[] = {
        &BD718XX_HWOPNAME(bd718xx_dvs_buck_regulator_ops),
        &BD718XX_HWOPNAME(bd718xx_dvs_buck_regulator_ops),
        &bd71837_buck34_ops_hwctrl, &bd71837_buck34_ops_hwctrl,