]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
ARM: 8584/1: floppy: avoid gcc-6 warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 1 Jul 2016 17:02:22 +0000 (18:02 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 6 Dec 2016 16:52:03 +0000 (16:52 +0000)
commit39fcfdf6bc01182388f7710d0755103468fdb4e7
tree0327ecdc9b45902b3e8b13a01b3d52987fa8ce2e
parentb86cb7dc1d8e02a6272efe3aea2df1ca27a8137d
ARM: 8584/1: floppy: avoid gcc-6 warning

BugLink: http://bugs.launchpad.net/bugs/1642572
commit dd665be0e243873343a28e18f9f345927b658daf upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
arch/arm/include/asm/floppy.h