Skip to content
Commit 230ea4c7 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

ARM: pxa: mainstone: avoid -Woverride-init warning



The default initializer at the start of the array causes a warning
when building with W=1:

In file included from arch/arm/mach-pxa/mainstone.c:47:
arch/arm/mach-pxa/mainstone.h:124:33: error: initialized field overwritten [-Werror=override-init]
  124 | #define MAINSTONE_IRQ(x)        (MAINSTONE_NR_IRQS + (x))
      |                                 ^
arch/arm/mach-pxa/mainstone.h:133:33: note: in expansion of macro 'MAINSTONE_IRQ'
  133 | #define MAINSTONE_S0_CD_IRQ     MAINSTONE_IRQ(9)
      |                                 ^~~~~~~~~~~~~
arch/arm/mach-pxa/mainstone.c:506:15: note: in expansion of macro 'MAINSTONE_S0_CD_IRQ'
  506 |         [5] = MAINSTONE_S0_CD_IRQ,
      |               ^~~~~~~~~~~~~~~~~~~

Rework the initializer to list each element explicitly and only once.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210323130849.2362001-1-arnd@kernel.org

'
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 28399a5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment