[PATCH] (8/22) lvalues abuse in lance

From: Al Viro
Date: Thu Aug 25 2005 - 00:28:31 EST


result of comma operator is not an lvalue

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
----
diff -urN RC13-rc7-mac8390/drivers/net/atarilance.c RC13-rc7-lance/drivers/net/atarilance.c
--- RC13-rc7-mac8390/drivers/net/atarilance.c 2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc7-lance/drivers/net/atarilance.c 2005-08-25 00:54:10.000000000 -0400
@@ -235,7 +235,7 @@
#define MEM lp->mem
#define DREG IO->data
#define AREG IO->addr
-#define REGA(a) ( AREG = (a), DREG )
+#define REGA(a) (*( AREG = (a), &DREG ))

/* Definitions for packet buffer access: */
#define PKT_BUF_SZ 1544
diff -urN RC13-rc7-mac8390/drivers/net/sun3lance.c RC13-rc7-lance/drivers/net/sun3lance.c
--- RC13-rc7-mac8390/drivers/net/sun3lance.c 2005-06-17 15:48:29.000000000 -0400
+++ RC13-rc7-lance/drivers/net/sun3lance.c 2005-08-25 00:54:10.000000000 -0400
@@ -162,7 +162,7 @@
#define MEM lp->mem
#define DREG lp->iobase[0]
#define AREG lp->iobase[1]
-#define REGA(a) ( AREG = (a), DREG )
+#define REGA(a) (*( AREG = (a), &DREG ))

/* Definitions for the Lance */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/