Skip to content

Commit

Permalink
NIOS2: irqflags: rename a redefined register name
Browse files Browse the repository at this point in the history
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: b31ebd8 ("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>
  • Loading branch information
Randy Dunlap authored and Dinh Nguyen committed Oct 18, 2021
1 parent 519d819 commit 4cce60f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/nios2/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

static inline unsigned long arch_local_save_flags(void)
{
return RDCTL(CTL_STATUS);
return RDCTL(CTL_FSTATUS);
}

/*
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion arch/nios2/include/asm/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4cce60f

Please sign in to comment.