NIOS2: irqflags: rename a redefined register name
authorRandy Dunlap <rdunlap@infradead.org>
Mon, 4 Oct 2021 07:56:06 +0000 (00:56 -0700)
committerDinh Nguyen <dinguyen@kernel.org>
Mon, 18 Oct 2021 16:22:59 +0000 (11:22 -0500)
Both arch/nios2/ and drivers/mmc/host/tmio_mmc.c define a macro
with the name "CTL_STATUS". Change the one in arch/nios2/ to be
"CTL_FSTATUS" (flags status) to eliminate the build warning.

In file included from ../drivers/mmc/host/tmio_mmc.c:22:
drivers/mmc/host/tmio_mmc.h:31: warning: "CTL_STATUS" redefined
   31 | #define CTL_STATUS 0x1c
arch/nios2/include/asm/registers.h:14: note: this is the location of the previous definition
   14 | #define CTL_STATUS      0

Fixes: b31ebd8055ea ("nios2: Nios2 registers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
arch/nios2/include/asm/irqflags.h
arch/nios2/include/asm/registers.h

index b3ec3e510706d5560e9513b53f1576d7f3cfb6d5..25acf27862f9155a7bff299e1544e22943b07a58 100644 (file)
@@ -9,7 +9,7 @@
 
 static inline unsigned long arch_local_save_flags(void)
 {
-       return RDCTL(CTL_STATUS);
+       return RDCTL(CTL_FSTATUS);
 }
 
 /*
@@ -18,7 +18,7 @@ static inline unsigned long arch_local_save_flags(void)
  */
 static inline void arch_local_irq_restore(unsigned long flags)
 {
-       WRCTL(CTL_STATUS, flags);
+       WRCTL(CTL_FSTATUS, flags);
 }
 
 static inline void arch_local_irq_disable(void)
index 183c720e454d915ad4690aa4e9184e4bf8f17270..95b67dd16f818866fb466ec27830371f3e2fcd00 100644 (file)
@@ -11,7 +11,7 @@
 #endif
 
 /* control register numbers */
-#define CTL_STATUS     0
+#define CTL_FSTATUS    0
 #define CTL_ESTATUS    1
 #define CTL_BSTATUS    2
 #define CTL_IENABLE    3