Skip to content

Commit e09a744

Browse files
GustavoARSilvageertu
authored andcommitted
m68k: amiga: config: Mark expected switch fall-through
Mark switch cases where we are expecting to fall through. This patch fixes the following warning (Building: allmodconfig m68k): arch/m68k/amiga/config.c: In function ‘amiga_identify’: ./arch/m68k/include/asm/amigahw.h:42:50: warning: this statement may fall through [-Wimplicit-fallthrough=] #define AMIGAHW_SET(name) (amiga_hw_present.name = 1) ~~~~~~~~~~~~~~~~~~~~~~~^~~~ arch/m68k/amiga/config.c:223:3: note: in expansion of macro ‘AMIGAHW_SET’ AMIGAHW_SET(PCMCIA); ^~~~~~~~~~~ arch/m68k/amiga/config.c:224:2: note: here case AMI_500: ^~~~ Replace the existing /* fall through */ comments and fix the issue above by using the new pseudo-keyword fallthrough; Signed-off-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/14ff577604d25243c8a897f851b436ba87ae87cb.1585264062.git.gustavo@embeddedor.com Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 8f3d9f3 commit e09a744

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/m68k/amiga/config.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ static void __init amiga_identify(void)
221221
case AMI_1200:
222222
AMIGAHW_SET(A1200_IDE);
223223
AMIGAHW_SET(PCMCIA);
224+
fallthrough;
224225
case AMI_500:
225226
case AMI_500PLUS:
226227
case AMI_1000:
@@ -233,7 +234,7 @@ static void __init amiga_identify(void)
233234
case AMI_3000T:
234235
AMIGAHW_SET(AMBER_FF);
235236
AMIGAHW_SET(MAGIC_REKICK);
236-
/* fall through */
237+
fallthrough;
237238
case AMI_3000PLUS:
238239
AMIGAHW_SET(A3000_SCSI);
239240
AMIGAHW_SET(A3000_CLK);
@@ -242,7 +243,7 @@ static void __init amiga_identify(void)
242243

243244
case AMI_4000T:
244245
AMIGAHW_SET(A4000_SCSI);
245-
/* fall through */
246+
fallthrough;
246247
case AMI_4000:
247248
AMIGAHW_SET(A4000_IDE);
248249
AMIGAHW_SET(A3000_CLK);

0 commit comments

Comments
 (0)