lkml.org 
[lkml]   [2021]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 25/44] NIOS2: irqflags: rename a redefined register name
    Date
    From: Randy Dunlap <rdunlap@infradead.org>

    [ Upstream commit 4cce60f15c04d69eff6ffc539ab09137dbe15070 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/nios2/include/asm/irqflags.h | 4 ++--
    arch/nios2/include/asm/registers.h | 2 +-
    2 files changed, 3 insertions(+), 3 deletions(-)

    --- a/arch/nios2/include/asm/irqflags.h
    +++ b/arch/nios2/include/asm/irqflags.h
    @@ -22,7 +22,7 @@

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

    /*
    @@ -31,7 +31,7 @@ static inline unsigned long arch_local_s
    */
    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)
    --- a/arch/nios2/include/asm/registers.h
    +++ b/arch/nios2/include/asm/registers.h
    @@ -24,7 +24,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

    \
     
     \ /
      Last update: 2021-10-25 21:40    [W:3.050 / U:0.988 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site