Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch remove some dead code, avoid set but unused variables.
details: https://anonhg.NetBSD.org/src/rev/e8597766b40c
branches: trunk
changeset: 327609:e8597766b40c
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Mar 12 22:21:07 2014 +0000
description:
remove some dead code, avoid set but unused variables.
diffstat:
sys/arch/evbmips/alchemy/dbau1550.c | 14 ++------------
sys/arch/mips/ralink/ralink_gpio.c | 10 +++++-----
2 files changed, 7 insertions(+), 17 deletions(-)
diffs (82 lines):
diff -r 04ca6affa5c1 -r e8597766b40c sys/arch/evbmips/alchemy/dbau1550.c
--- a/sys/arch/evbmips/alchemy/dbau1550.c Wed Mar 12 21:40:07 2014 +0000
+++ b/sys/arch/evbmips/alchemy/dbau1550.c Wed Mar 12 22:21:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dbau1550.c,v 1.12 2011/07/10 00:03:52 matt Exp $ */
+/* $NetBSD: dbau1550.c,v 1.13 2014/03/12 22:21:07 mrg Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbau1550.c,v 1.12 2011/07/10 00:03:52 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbau1550.c,v 1.13 2014/03/12 22:21:07 mrg Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -320,18 +320,8 @@
void
dbau1550_slot_disable(int slot)
{
- int shift;
uint16_t status;
- switch (slot) {
- case 0:
- shift = DBAU1550_PCMCIA_PC0_SHIFT;
- break;
- case 1:
- shift = DBAU1550_PCMCIA_PC1_SHIFT;
- break;
- }
-
status = GET16(DBAU1550_PCMCIA);
status &= ~(DBAU1550_PCMCIA_MASK);
PUT16(DBAU1550_PCMCIA, status);
diff -r 04ca6affa5c1 -r e8597766b40c sys/arch/mips/ralink/ralink_gpio.c
--- a/sys/arch/mips/ralink/ralink_gpio.c Wed Mar 12 21:40:07 2014 +0000
+++ b/sys/arch/mips/ralink/ralink_gpio.c Wed Mar 12 22:21:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ralink_gpio.c,v 1.4 2012/10/27 17:18:02 chs Exp $ */
+/* $NetBSD: ralink_gpio.c,v 1.5 2014/03/12 22:21:07 mrg Exp $ */
/*-
* Copyright (c) 2011 CradlePoint Technology, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
/* ra_gpio.c -- Ralink 3052 gpio driver */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.4 2012/10/27 17:18:02 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ralink_gpio.c,v 1.5 2014/03/12 22:21:07 mrg Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -665,7 +665,6 @@
static void
ra_gpio_pin_init(ra_gpio_softc_t *sc, int pin)
{
- u_int gpio_mode;
uint32_t r;
sc->sc_pins[pin].pin_caps = 0;
@@ -692,7 +691,6 @@
sc->sc_pins[pin].pin_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT |
GPIO_PIN_INVIN | GPIO_PIN_INVOUT;
sc->sc_pins[pin].pin_state = GPIO_PIN_INPUT;
- gpio_mode = 0;
#if defined(SLICKROCK)
r = sy_read(sc, RA_SYSCTL_GPIOMODE);
@@ -706,7 +704,9 @@
* GPIO0 doesn't have an associated MODE register.
*/
if (pin != 0) {
- for (gpio_mode=0; gpio_mode < GPIO_MODE_SETTINGS; gpio_mode++) {
+ u_int gpio_mode = 0;
+
+ for (gpio_mode; gpio_mode < GPIO_MODE_SETTINGS; gpio_mode++) {
if (pin <= pin_share[gpio_mode]) {
r = sy_read(sc, RA_SYSCTL_GPIOMODE);
if (10 == pin) {
Home |
Main Index |
Thread Index |
Old Index