Skip to content

Commit dd665be

Browse files
arndbRussell King
authored andcommitted
ARM: 8584/1: floppy: avoid gcc-6 warning
gcc-6.0 warns about comparisons between two identical expressions, which is what we get in the floppy driver when writing to the FD_DOR register: drivers/block/floppy.c: In function 'set_dor': drivers/block/floppy.c:810:44: error: self-comparison always evaluates to true [-Werror=tautological-compare] fd_outb(newdor, FD_DOR); It would be nice to use a static inline function instead of the macro, to avoid the warning, but we cannot do that because the FD_DOR definition is incomplete at this point. Adding a cast to (u32) is a harmless way to shut up the warning, just not very nice. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 14c4a53 commit dd665be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/include/asm/floppy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#define fd_outb(val,port) \
1919
do { \
20-
if ((port) == FD_DOR) \
20+
if ((port) == (u32)FD_DOR) \
2121
fd_setdor((val)); \
2222
else \
2323
outb((val),(port)); \

0 commit comments

Comments
 (0)