stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ARM: 8584/1: floppy: avoid gcc-6 warning" has been added to the 4.4-stable tree
@ 2016-11-09 10:08 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-11-09 10:08 UTC (permalink / raw)
  To: arnd, gregkh, rmk+kernel; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ARM: 8584/1: floppy: avoid gcc-6 warning

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm-8584-1-floppy-avoid-gcc-6-warning.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From dd665be0e243873343a28e18f9f345927b658daf Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Fri, 1 Jul 2016 18:02:22 +0100
Subject: ARM: 8584/1: floppy: avoid gcc-6 warning

From: Arnd Bergmann <arnd@arndb.de>

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>

---
 arch/arm/include/asm/floppy.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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));	\


Patches currently in stable-queue which might be from arnd@arndb.de are

queue-4.4/drm-exynos-fix-error-handling-in-exynos_drm_subdrv_open.patch
queue-4.4/arm-8584-1-floppy-avoid-gcc-6-warning.patch
queue-4.4/powerpc-ptrace-fix-out-of-bounds-array-access-warning.patch
queue-4.4/cgroup-avoid-false-positive-gcc-6-warning.patch
queue-4.4/smc91x-avoid-self-comparison-warning.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-09 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 10:08 Patch "ARM: 8584/1: floppy: avoid gcc-6 warning" has been added to the 4.4-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).