On 8/7/25 09:56, Philip Oberfichtner wrote:
Before this commit, mtmips_spl_serial_init() caused the following
warning:

   arch/mips/mach-mtmips/mt7628/serial.c:14:23: warning: unused variable ‘base’ 
[-Wunused-variable]
      14 |         void __iomem *base = ioremap_nocache(SYSCTL_BASE, 
SYSCTL_SIZE);
         |                       ^~~~

This happens whenever CONFIG_SPECIFY_CONSOLE_INDEX is unset, which leads
to an effectively empty function:

   void mtmips_spl_serial_init(void)
   {
          void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
   }

Add the __maybe_unused attribute to silence this warning.

Signed-off-by: Philip Oberfichtner <p...@denx.de>
---

Notes:
     Changes in v6: none
Changes in v5: none Changes in v4: new

  arch/mips/mach-mtmips/mt7620/serial.c     | 2 +-
  arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +-
  arch/mips/mach-mtmips/mt7628/serial.c     | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)


Reviewed-by: Daniel Schwierzeck <daniel.schwierz...@gmail.com>

--
- Daniel

Reply via email to