Module Name:    src
Committed By:   christos
Date:           Mon Nov  4 16:53:09 UTC 2013

Modified Files:
        src/sys/dev/tc: mfb.c px.c pxg.c

Log Message:
add __USE() for unused volatile variables, so that we generate the same code.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/tc/mfb.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/tc/px.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/tc/pxg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/tc/mfb.c
diff -u src/sys/dev/tc/mfb.c:1.58 src/sys/dev/tc/mfb.c:1.59
--- src/sys/dev/tc/mfb.c:1.58	Wed Jan 11 16:12:36 2012
+++ src/sys/dev/tc/mfb.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $ */
+/* $NetBSD: mfb.c,v 1.59 2013/11/04 16:53:09 christos Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.58 2012/01/11 21:12:36 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.59 2013/11/04 16:53:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -260,6 +260,7 @@ mfbattach(device_t parent, device_t self
 	/* clear any pending interrupts */
 	*(uint8_t *)((char *)ri->ri_hw + MX_IREQ_OFFSET) = 0;
 	junk = *(uint8_t *)((char *)ri->ri_hw + MX_IREQ_OFFSET);
+	__USE(junk);
 	*(uint8_t *)((char *)ri->ri_hw + MX_IREQ_OFFSET) = 1;
 
 	waa.console = console;
@@ -471,6 +472,7 @@ mfbintr(void *arg)
 
 	base = (void *)sc->sc_ri->ri_hw;
 	junk = *(uint8_t *)(base + MX_IREQ_OFFSET);
+	__USE(junk);
 #if 0
 	*(uint8_t *)(base + MX_IREQ_OFFSET) = 0;
 #endif

Index: src/sys/dev/tc/px.c
diff -u src/sys/dev/tc/px.c:1.39 src/sys/dev/tc/px.c:1.40
--- src/sys/dev/tc/px.c:1.39	Sat Oct 27 13:18:38 2012
+++ src/sys/dev/tc/px.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* 	$NetBSD: px.c,v 1.39 2012/10/27 17:18:38 chs Exp $	*/
+/* 	$NetBSD: px.c,v 1.40 2013/11/04 16:53:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.39 2012/10/27 17:18:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.40 2013/11/04 16:53:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -344,6 +344,7 @@ px_pbuf_post(struct stic_info *si, uint3
 			sr->sr_ipdvint = STIC_INT_P_WE;
 			tc_wmb();
 			junk = *poll;
+			__USE(junk);
 			return (0);
 		}
 		DELAY(STAMP_DELAY);

Index: src/sys/dev/tc/pxg.c
diff -u src/sys/dev/tc/pxg.c:1.34 src/sys/dev/tc/pxg.c:1.35
--- src/sys/dev/tc/pxg.c:1.34	Tue Mar 13 14:40:34 2012
+++ src/sys/dev/tc/pxg.c	Mon Nov  4 11:53:09 2013
@@ -1,4 +1,4 @@
-/* 	$NetBSD: pxg.c,v 1.34 2012/03/13 18:40:34 elad Exp $	*/
+/* 	$NetBSD: pxg.c,v 1.35 2013/11/04 16:53:09 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.34 2012/03/13 18:40:34 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.35 2013/11/04 16:53:09 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -338,6 +338,7 @@ pxg_pbuf_post(struct stic_info *si, uint
 			sr->sr_ipdvint = STIC_INT_P_WE;
 			tc_wmb();
 			junk = *poll;
+			__USE(junk);
 			return (0);
 		}
 		DELAY(STAMP_DELAY);

Reply via email to