mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] mm: fix set but not used warning
@ 2019-02-18 13:57 YueHaibing
  2019-02-19 18:28 ` Kani, Toshi
  0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2019-02-18 13:57 UTC (permalink / raw)
  To: Andrew Morton, Toshi Kani, Will Deacon, Chintan Pandya, Thomas Gleixner
  Cc: YueHaibing, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

lib/ioremap.c: In function 'ioremap_page_range':
lib/ioremap.c:203:16: warning:
 variable 'start' set but not used [-Wunused-but-set-variable]

flush_cache_vmap may no need param, so add __maybe_unused fix this warning.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 lib/ioremap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ioremap.c b/lib/ioremap.c
index 063213685563..d1c7a488e731 100644
--- a/lib/ioremap.c
+++ b/lib/ioremap.c
@@ -200,7 +200,7 @@ int ioremap_page_range(unsigned long addr,
 		       unsigned long end, phys_addr_t phys_addr, pgprot_t prot)
 {
 	pgd_t *pgd;
-	unsigned long start;
+	unsigned long __maybe_unused start;
 	unsigned long next;
 	int err;




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

end of thread, other threads:[~2019-02-20 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 13:57 [PATCH -next] mm: fix set but not used warning YueHaibing
2019-02-19 18:28 ` Kani, Toshi
2019-02-20 21:43   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®