diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-07-01 18:02:22 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@microsoft.com> | 2018-01-17 12:55:42 -0500 |
commit | 6f2248686a9b20ad8c9bea6126b2495d7f8048e7 (patch) | |
tree | 2847c4940acfbd3234ec037aee5d2e1c30452838 | |
parent | 74b6cfd76efd9787afc57dd8983881911b8806ec (diff) |
ARM: 8584/1: floppy: avoid gcc-6 warning
[ Upstream commit dd665be0e243873343a28e18f9f345927b658daf ]
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 <arnd@arndb.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-rw-r--r-- | arch/arm/include/asm/floppy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/floppy.h b/arch/arm/include/asm/floppy.h index f4882553fbb0..85a34cc8316a 100644 --- a/arch/arm/include/asm/floppy.h +++ b/arch/arm/include/asm/floppy.h @@ -17,7 +17,7 @@ #define fd_outb(val,port) \ do { \ - if ((port) == FD_DOR) \ + if ((port) == (u32)FD_DOR) \ fd_setdor((val)); \ else \ outb((val),(port)); \ |