soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
Subsystems (2)
Palmer Dabbelt
maintainerPATCH 1/2 soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
From: Palmer Dabbelt <[email protected]>
GCC warns about this comparison, which is unnecessary.
Signed-off-by Palmer Dabbelt <[email protected]>
--- drivers/soc/sifive/sifive_l2_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/sifive/sifive_l2_cache.c +1 -1
@@ -51,7 +51,7 @@ static ssize_t l2_write(struct file *file, const char __user *data,if (kstrtouint_from_user (data, count,0 , &val))return -EINVAL ; -if ((val >=0 && val <0xFF ) || (val >=0x10000 && val <0x100FF )) +if ((val <0xFF ) || (val >=0x10000 && val <0x100FF ))writel (val, l2_base +SIFIVE_L2_ECCINJECTERR );else return -EINVAL ;
Signature · 1 line
2.27.0.rc0.183.gde8f92d652-goog
Palmer Dabbelt
maintainerPATCH 2/2 soc: sifive: l2 cache: Mark l2_get_priv_group as static
From: Palmer Dabbelt <[email protected]>
The kbuild test robot is firing a warning over a missing prototype. The function can just be static.
Reported-by kbuild test robot <[email protected]>
Signed-off-by Palmer Dabbelt <[email protected]>
--- drivers/soc/sifive/sifive_l2_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/sifive/sifive_l2_cache.c +1 -1
@@ -133,7 +133,7 @@ static const struct attribute_group priv_attr_group = { .attrs = priv_attrs, }; -const struct attribute_group *l2_get_priv_group (struct cacheinfo *this_leaf) +static const struct attribute_group *l2_get_priv_group (struct cacheinfo *this_leaf) {/* We want to use private group for L2 cache only */ if (this_leaf->level ==2 )
Signature · 1 line
2.27.0.rc0.183.gde8f92d652-goog