Re: [PATCH 11/16] floppy: remove dead code for drives scanning on ARM

From: Denis Efremov
Date: Sun Mar 01 2020 - 03:25:15 EST


Hi,

For patches 11-16,

I've checked the building on x86, arm.
x86 shows no difference in floppy.o binary.

Compilation on arm tested (make rpc_defconfig).

I think that macro fd_outb from arm could be turned to
the static inline function, like on mips or m68k arches. However,
it's up to you if you want to keep the changes close to the
original structure.

Please address the warnings and resend the patches:

In file included from drivers/block/floppy.c:251:
./arch/arm/include/asm/floppy.h:60:2: warning: braces around scalar initializer
60 | { 0x10, 0x21, 0x23, 0x33 },
| ^
./arch/arm/include/asm/floppy.h:60:2: note: (near initialization for âfloppy_selects[0]â)
./arch/arm/include/asm/floppy.h:60:10: warning: excess elements in scalar initializer
60 | { 0x10, 0x21, 0x23, 0x33 },
| ^~~~
./arch/arm/include/asm/floppy.h:60:10: note: (near initialization for âfloppy_selects[0]â)
./arch/arm/include/asm/floppy.h:60:16: warning: excess elements in scalar initializer
60 | { 0x10, 0x21, 0x23, 0x33 },
| ^~~~
./arch/arm/include/asm/floppy.h:60:16: note: (near initialization for âfloppy_selects[0]â)
./arch/arm/include/asm/floppy.h:60:22: warning: excess elements in scalar initializer
60 | { 0x10, 0x21, 0x23, 0x33 },
| ^~~~
./arch/arm/include/asm/floppy.h:60:22: note: (near initialization for âfloppy_selects[0]â)
CC [M] drivers/block/loop.o
drivers/block/floppy.c: In function âfdc_outbâ:
./arch/arm/include/asm/floppy.h:15:14: warning: suggest parentheses around comparison in operand of â&â [-Wparentheses]
15 | if ((port) & 7 == FD_DOR) { \
| ^
drivers/block/floppy.c:603:2: note: in expansion of macro âfd_outbâ
603 | fd_outb(value, fdc_state[fdc].address + reg);


Everything else looks good to me. Thanks!

Regards,
Denis