Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/tc add __USE() for unused volatile variables, so tha...
details: https://anonhg.NetBSD.org/src/rev/40e98f749727
branches: trunk
changeset: 791085:40e98f749727
user: christos <christos%NetBSD.org@localhost>
date: Mon Nov 04 16:53:09 2013 +0000
description:
add __USE() for unused volatile variables, so that we generate the same code.
diffstat:
sys/dev/tc/mfb.c | 6 ++++--
sys/dev/tc/px.c | 5 +++--
sys/dev/tc/pxg.c | 5 +++--
3 files changed, 10 insertions(+), 6 deletions(-)
diffs (86 lines):
diff -r 4ec36f6db68f -r 40e98f749727 sys/dev/tc/mfb.c
--- a/sys/dev/tc/mfb.c Mon Nov 04 16:52:08 2013 +0000
+++ b/sys/dev/tc/mfb.c Mon Nov 04 16:53:09 2013 +0000
@@ -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 @@
/* 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 @@
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
diff -r 4ec36f6db68f -r 40e98f749727 sys/dev/tc/px.c
--- a/sys/dev/tc/px.c Mon Nov 04 16:52:08 2013 +0000
+++ b/sys/dev/tc/px.c Mon Nov 04 16:53:09 2013 +0000
@@ -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 @@
sr->sr_ipdvint = STIC_INT_P_WE;
tc_wmb();
junk = *poll;
+ __USE(junk);
return (0);
}
DELAY(STAMP_DELAY);
diff -r 4ec36f6db68f -r 40e98f749727 sys/dev/tc/pxg.c
--- a/sys/dev/tc/pxg.c Mon Nov 04 16:52:08 2013 +0000
+++ b/sys/dev/tc/pxg.c Mon Nov 04 16:53:09 2013 +0000
@@ -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 @@
sr->sr_ipdvint = STIC_INT_P_WE;
tc_wmb();
junk = *poll;
+ __USE(junk);
return (0);
}
DELAY(STAMP_DELAY);
Home |
Main Index |
Thread Index |
Old Index