Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/at91 Deal with unused variable warnings
details: https://anonhg.NetBSD.org/src/rev/1a4658208d72
branches: trunk
changeset: 340635:1a4658208d72
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Sep 21 13:31:30 2015 +0000
description:
Deal with unused variable warnings
diffstat:
sys/arch/arm/at91/at91dbgu.c | 8 ++++----
sys/arch/arm/at91/at91emac.c | 25 ++++++++++++++-----------
2 files changed, 18 insertions(+), 15 deletions(-)
diffs (96 lines):
diff -r 7d71db6c1cc8 -r 1a4658208d72 sys/arch/arm/at91/at91dbgu.c
--- a/sys/arch/arm/at91/at91dbgu.c Mon Sep 21 12:32:06 2015 +0000
+++ b/sys/arch/arm/at91/at91dbgu.c Mon Sep 21 13:31:30 2015 +0000
@@ -1,5 +1,5 @@
-/* $Id: at91dbgu.c,v 1.14 2015/04/13 21:18:40 riastradh Exp $ */
-/* $NetBSD: at91dbgu.c,v 1.14 2015/04/13 21:18:40 riastradh Exp $ */
+/* $Id: at91dbgu.c,v 1.15 2015/09/21 13:31:30 skrll Exp $ */
+/* $NetBSD: at91dbgu.c,v 1.15 2015/09/21 13:31:30 skrll Exp $ */
/*
*
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.14 2015/04/13 21:18:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91dbgu.c,v 1.15 2015/09/21 13:31:30 skrll Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -910,7 +910,7 @@
if (!db_active)
#endif
{
- int cn_trapped = 0; /* unused */
+ int cn_trapped __unused = 0;
cn_check_magic(dev, c, at91dbgu_cnm_state);
}
diff -r 7d71db6c1cc8 -r 1a4658208d72 sys/arch/arm/at91/at91emac.c
--- a/sys/arch/arm/at91/at91emac.c Mon Sep 21 12:32:06 2015 +0000
+++ b/sys/arch/arm/at91/at91emac.c Mon Sep 21 13:31:30 2015 +0000
@@ -1,5 +1,5 @@
-/* $Id: at91emac.c,v 1.14 2015/05/20 09:17:17 ozaki-r Exp $ */
-/* $NetBSD: at91emac.c,v 1.14 2015/05/20 09:17:17 ozaki-r Exp $ */
+/* $Id: at91emac.c,v 1.15 2015/09/21 13:31:30 skrll Exp $ */
+/* $NetBSD: at91emac.c,v 1.15 2015/09/21 13:31:30 skrll Exp $ */
/*
* Copyright (c) 2007 Embedtronics Oy
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.14 2015/05/20 09:17:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.15 2015/09/21 13:31:30 skrll Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -224,7 +224,7 @@
{
struct emac_softc *sc = (struct emac_softc *)arg;
struct ifnet * ifp = &sc->sc_ec.ec_if;
- uint32_t imr, isr, rsr, ctl;
+ uint32_t imr, isr, ctl;
int bi;
imr = ~EMAC_READ(ETH_IMR);
@@ -234,7 +234,10 @@
}
isr = EMAC_READ(ETH_ISR) & imr;
- rsr = EMAC_READ(ETH_RSR); // get receive status register
+#ifdef EMAC_DEBUG
+ uint32_t rsr =
+#endif
+ EMAC_READ(ETH_RSR); // get receive status register
DPRINTFN(2, ("%s: isr=0x%08X rsr=0x%08X imr=0x%08X\n", __FUNCTION__, isr, rsr, imr));
@@ -519,9 +522,9 @@
int
emac_mii_readreg(device_t self, int phy, int reg)
{
- struct emac_softc *sc;
-
- sc = device_private(self);
+#ifndef EMAC_FAST
+ struct emac_softc *sc = device_private(self);
+#endif
EMAC_WRITE(ETH_MAN, (ETH_MAN_HIGH | ETH_MAN_RW_RD
| ((phy << ETH_MAN_PHYA_SHIFT) & ETH_MAN_PHYA)
@@ -534,9 +537,9 @@
void
emac_mii_writereg(device_t self, int phy, int reg, int val)
{
- struct emac_softc *sc;
-
- sc = device_private(self);
+#ifndef EMAC_FAST
+ struct emac_softc *sc = device_private(self);
+#endif
EMAC_WRITE(ETH_MAN, (ETH_MAN_HIGH | ETH_MAN_RW_WR
| ((phy << ETH_MAN_PHYA_SHIFT) & ETH_MAN_PHYA)
Home |
Main Index |
Thread Index |
Old Index