Skip to content

Commit 91be258

Browse files
committed
x86/fpu/math-emu: Address fallthrough warnings
/home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c: In function ‘FPU_printall’: /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c:187:9: warning: this statement may fall through [-Wimplicit-fallthrough=] tagi = FPU_Special(r); ~~~~~^~~~~~~~~~~~~~~~ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/errors.c:188:3: note: here case TAG_Valid: ^~~~ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c: In function ‘fyl2xp1’: /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c:1353:7: warning: this statement may fall through [-Wimplicit-fallthrough=] if (denormal_operand() < 0) ^ /home/tglx/work/kernel/linus/linux/arch/x86/math-emu/fpu_trig.c:1356:3: note: here case TAG_Zero: Remove the pointless 'break;' after 'continue;' while at it. Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 5785675 commit 91be258

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

arch/x86/math-emu/errors.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,15 @@ void FPU_printall(void)
178178
for (i = 0; i < 8; i++) {
179179
FPU_REG *r = &st(i);
180180
u_char tagi = FPU_gettagi(i);
181+
181182
switch (tagi) {
182183
case TAG_Empty:
183184
continue;
184-
break;
185185
case TAG_Zero:
186186
case TAG_Special:
187+
/* Update tagi for the printk below */
187188
tagi = FPU_Special(r);
189+
/* fall through */
188190
case TAG_Valid:
189191
printk("st(%d) %c .%04lx %04lx %04lx %04lx e%+-6d ", i,
190192
getsign(r) ? '-' : '+',
@@ -198,7 +200,6 @@ void FPU_printall(void)
198200
printk("Whoops! Error in errors.c: tag%d is %d ", i,
199201
tagi);
200202
continue;
201-
break;
202203
}
203204
printk("%s\n", tag_desc[(int)(unsigned)tagi]);
204205
}

arch/x86/math-emu/fpu_trig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ static void fyl2xp1(FPU_REG *st0_ptr, u_char st0_tag)
13521352
case TW_Denormal:
13531353
if (denormal_operand() < 0)
13541354
return;
1355-
1355+
/* fall through */
13561356
case TAG_Zero:
13571357
case TAG_Valid:
13581358
setsign(st0_ptr, getsign(st0_ptr) ^ getsign(st1_ptr));

0 commit comments

Comments
 (0)