Message ID | 20200715024701.28356-1-yuehaibing@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [-next] soc: integrator: Drop pointless static qualifier in integrator_soc_init() | expand |
On Wed, Jul 15, 2020 at 4:47 AM YueHaibing <yuehaibing@huawei.com> wrote: > There is no need to have the 'struct regmap *syscon_regmap' variable > static since new value always be assigned before use it. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: YueHaibing <yuehaibing@huawei.com> Patch applied. Yours, Linus Walleij
diff --git a/drivers/soc/versatile/soc-integrator.c b/drivers/soc/versatile/soc-integrator.c index 7dcf77ccd31e..bab4ad87aa75 100644 --- a/drivers/soc/versatile/soc-integrator.c +++ b/drivers/soc/versatile/soc-integrator.c @@ -100,7 +100,7 @@ ATTRIBUTE_GROUPS(integrator); static int __init integrator_soc_init(void) { - static struct regmap *syscon_regmap; + struct regmap *syscon_regmap; struct soc_device *soc_dev; struct soc_device_attribute *soc_dev_attr; struct device_node *np;
There is no need to have the 'struct regmap *syscon_regmap' variable static since new value always be assigned before use it. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/soc/versatile/soc-integrator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)