lkml.org 
[lkml]   [2020]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] clocksource: clint: Avoid remove __iomem in get_cycles_hi()
Date
From
From: Palmer Dabbelt <palmerdabbelt@google.com>

This cast loses the __iomem qualifier from clint_timer_val, which
triggers an sparse warning.

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

diff --git a/drivers/clocksource/timer-clint.c b/drivers/clocksource/timer-clint.c
index 6cfe2ab73eb0..83a8b38d46f6 100644
--- a/drivers/clocksource/timer-clint.c
+++ b/drivers/clocksource/timer-clint.c
@@ -63,7 +63,7 @@ static struct riscv_ipi_ops clint_ipi_ops = {
#define clint_get_cycles() readq_relaxed(clint_timer_val)
#else
#define clint_get_cycles() readl_relaxed(clint_timer_val)
-#define clint_get_cycles_hi() readl_relaxed(((u32 *)clint_timer_val) + 1)
+#define clint_get_cycles_hi() readl_relaxed(((u32 __iomem *)clint_timer_val) + 1)
#endif

#ifdef CONFIG_64BIT
--
2.29.2.729.g45daf8777d-goog
\
 
 \ /
  Last update: 2020-12-22 06:37    [W:0.063 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site