Date: Tue, 12 May 1998 15:57:31 +0200 (MET DST)
From: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
To: linux-m68k@lists.linux-m68k.org
In-reply-to: <d3btt38wab.fsf@valhall.cern.ch> (message from Jes Sorensen on 12
	May 1998 15:15:56 +0200)
Subject: Re: L68K: Hades PCI fixes
Sender: owner-linux-m68k@phil.uni-sb.de


> I was actually convinced that I had applied this already - well I
> just applied Wout's patch.

Wout's patch can't hurt and will avoid surprises in future, at least
in this place. But my patch should be in there nevertheless, for other
places that may incur the same problem.

Ahhh, stop! I just wanted to repost that patch, now I realize that it
was about readb() & Co., not writeb(). It seems that gcc now (2.8.x?)
now also insists on returning an unused value on memory writes. I
suggest that we include the (void) cast in the writeb() macro
directly, i.e.:

--- linux-2.1.99/include/asm-m68k/io.h	Tue Mar 17 18:40:59 1998
+++ tmp/io.h	Tue May 12 15:56:32 1998
@@ -28,9 +28,9 @@
 #define readl(addr) \
     ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
 
-#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
+#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
+#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
+#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
 
 #define memset_io(a,b,c)	memset((void *)(a),(b),(c))
 #define memcpy_fromio(a,b,c)	memcpy((a),(void *)(b),(c))


Roman
