lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] cache: sifive_ccache: Silence unused variable warning
Date
With W=1 and CONFIG_RISCV_NONSTANDARD_CACHE_OPS=n, GCC warns:

drivers/cache/sifive_ccache.c: In function 'sifive_ccache_init':
drivers/cache/sifive_ccache.c:293:23: warning: variable 'quirks' set but not used [-Wunused-but-set-variable]
293 | unsigned long quirks;
| ^~~~~~

This is expected, since QUIRK_NONSTANDARD_CACHE_OPS is the only quirk
still handled in this function.

Fixes: c90847bcbfb6 ("cache: sifive_ccache: Partially convert to a platform driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403311253.Z4NvIBxI-lkp@intel.com/
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---

drivers/cache/sifive_ccache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cache/sifive_ccache.c b/drivers/cache/sifive_ccache.c
index e9cc8b4786fb..6874b72ec59d 100644
--- a/drivers/cache/sifive_ccache.c
+++ b/drivers/cache/sifive_ccache.c
@@ -290,7 +290,7 @@ static int __init sifive_ccache_init(void)
struct device_node *np;
struct resource res;
const struct of_device_id *match;
- unsigned long quirks;
+ unsigned long quirks __maybe_unused;
int rc;

np = of_find_matching_node_and_match(NULL, sifive_ccache_ids, &match);
--
2.44.0

\
 
 \ /
  Last update: 2024-05-27 16:33    [W:0.053 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site