All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
@ 2020-05-28 22:43 ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-05-28 22:43 UTC (permalink / raw)
  To: linux-riscv
  Cc: Palmer Dabbelt, Paul Walmsley, yash.shah, anup, bp, linux-riscv,
	linux-kernel, kernel-team, kernel-team, Palmer Dabbelt

From: Palmer Dabbelt <palmerdabbelt@google.com>

GCC warns about this comparison, which is unnecessary.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 drivers/soc/sifive/sifive_l2_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c
index d5f266551880..51e198880a8d 100644
--- a/drivers/soc/sifive/sifive_l2_cache.c
+++ b/drivers/soc/sifive/sifive_l2_cache.c
@@ -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;
-- 
2.27.0.rc0.183.gde8f92d652-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/2] soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
@ 2020-05-28 22:43 ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-05-28 22:43 UTC (permalink / raw)
  To: linux-riscv
  Cc: anup, Palmer Dabbelt, linux-kernel, yash.shah, Palmer Dabbelt,
	Paul Walmsley, linux-riscv, bp, kernel-team

From: Palmer Dabbelt <palmerdabbelt@google.com>

GCC warns about this comparison, which is unnecessary.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 drivers/soc/sifive/sifive_l2_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c
index d5f266551880..51e198880a8d 100644
--- a/drivers/soc/sifive/sifive_l2_cache.c
+++ b/drivers/soc/sifive/sifive_l2_cache.c
@@ -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;
-- 
2.27.0.rc0.183.gde8f92d652-goog



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] soc: sifive: l2 cache: Mark l2_get_priv_group as static
  2020-05-28 22:43 ` Palmer Dabbelt
@ 2020-05-28 22:43   ` Palmer Dabbelt
  -1 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-05-28 22:43 UTC (permalink / raw)
  To: linux-riscv
  Cc: Palmer Dabbelt, Paul Walmsley, yash.shah, anup, bp, linux-riscv,
	linux-kernel, kernel-team, kernel-team, Palmer Dabbelt,
	kbuild test robot

From: Palmer Dabbelt <palmerdabbelt@google.com>

The kbuild test robot is firing a warning over a missing prototype.  The
function can just be static.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 drivers/soc/sifive/sifive_l2_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c
index 51e198880a8d..44d7e1951da3 100644
--- a/drivers/soc/sifive/sifive_l2_cache.c
+++ b/drivers/soc/sifive/sifive_l2_cache.c
@@ -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)
-- 
2.27.0.rc0.183.gde8f92d652-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] soc: sifive: l2 cache: Mark l2_get_priv_group as static
@ 2020-05-28 22:43   ` Palmer Dabbelt
  0 siblings, 0 replies; 4+ messages in thread
From: Palmer Dabbelt @ 2020-05-28 22:43 UTC (permalink / raw)
  To: linux-riscv
  Cc: kbuild test robot, anup, Palmer Dabbelt, linux-kernel, yash.shah,
	Palmer Dabbelt, Paul Walmsley, linux-riscv, bp, kernel-team

From: Palmer Dabbelt <palmerdabbelt@google.com>

The kbuild test robot is firing a warning over a missing prototype.  The
function can just be static.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 drivers/soc/sifive/sifive_l2_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c
index 51e198880a8d..44d7e1951da3 100644
--- a/drivers/soc/sifive/sifive_l2_cache.c
+++ b/drivers/soc/sifive/sifive_l2_cache.c
@@ -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)
-- 
2.27.0.rc0.183.gde8f92d652-goog



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-28 22:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 22:43 [PATCH 1/2] soc: sifive: l2 cache: Eliminate an unsigned zero compare warning Palmer Dabbelt
2020-05-28 22:43 ` Palmer Dabbelt
2020-05-28 22:43 ` [PATCH 2/2] soc: sifive: l2 cache: Mark l2_get_priv_group as static Palmer Dabbelt
2020-05-28 22:43   ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.