Module Name: src
Committed By: mrg
Date: Mon Dec 16 15:46:57 UTC 2013
Modified Files:
src/sys/arch/arc/arc: c_magnum.c c_nec_jazz.c machdep.c
src/sys/arch/arc/jazz: fd.c
Log Message:
- remove unused variables
- use (void) when we don't care about the return value
- move variables inside their usage #if
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arc/arc/c_magnum.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arc/arc/c_nec_jazz.c
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/arc/arc/machdep.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/arc/jazz/fd.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/arch/arc/arc/c_magnum.c
diff -u src/sys/arch/arc/arc/c_magnum.c:1.22 src/sys/arch/arc/arc/c_magnum.c:1.23
--- src/sys/arch/arc/arc/c_magnum.c:1.22 Fri Jul 1 19:28:00 2011
+++ src/sys/arch/arc/arc/c_magnum.c Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: c_magnum.c,v 1.22 2011/07/01 19:28:00 dyoung Exp $ */
+/* $NetBSD: c_magnum.c,v 1.23 2013/12/16 15:46:57 mrg Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.22 2011/07/01 19:28:00 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: c_magnum.c,v 1.23 2013/12/16 15:46:57 mrg Exp $");
#define __INTR_PRIVATE
#include <sys/param.h>
@@ -105,9 +105,8 @@ static const struct ipl_sr_map magnum_ip
uint32_t
timer_magnum_intr(uint32_t mask, struct clockframe *cf)
{
- int temp;
- temp = inw(R4030_SYS_IT_STAT);
+ (void)inw(R4030_SYS_IT_STAT);
last_cp0_count = mips3_cp0_count_read();
hardclock(cf);
timer_jazzio_ev.ev_count++;
Index: src/sys/arch/arc/arc/c_nec_jazz.c
diff -u src/sys/arch/arc/arc/c_nec_jazz.c:1.13 src/sys/arch/arc/arc/c_nec_jazz.c:1.14
--- src/sys/arch/arc/arc/c_nec_jazz.c:1.13 Fri Mar 14 16:43:27 2008
+++ src/sys/arch/arc/arc/c_nec_jazz.c Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: c_nec_jazz.c,v 1.13 2008/03/14 16:43:27 tsutsui Exp $ */
+/* $NetBSD: c_nec_jazz.c,v 1.14 2013/12/16 15:46:57 mrg Exp $ */
/*-
* Copyright (C) 2000 Shuichiro URATA. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: c_nec_jazz.c,v 1.13 2008/03/14 16:43:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: c_nec_jazz.c,v 1.14 2013/12/16 15:46:57 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -65,9 +65,8 @@ struct timer_jazzio_config timer_nec_jaz
uint32_t
timer_nec_jazz_intr(uint32_t mask, struct clockframe *cf)
{
- int temp;
- temp = in32(RD94_SYS_INTSTAT3);
+ (void)in32(RD94_SYS_INTSTAT3);
last_cp0_count = mips3_cp0_count_read();
hardclock(cf);
timer_jazzio_ev.ev_count++;
Index: src/sys/arch/arc/arc/machdep.c
diff -u src/sys/arch/arc/arc/machdep.c:1.126 src/sys/arch/arc/arc/machdep.c:1.127
--- src/sys/arch/arc/arc/machdep.c:1.126 Sat Jul 28 23:08:56 2012
+++ src/sys/arch/arc/arc/machdep.c Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.126 2012/07/28 23:08:56 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.127 2013/12/16 15:46:57 mrg Exp $ */
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
/*
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.126 2012/07/28 23:08:56 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.127 2013/12/16 15:46:57 mrg Exp $");
#include "opt_ddb.h"
#include "opt_ddbparam.h"
@@ -172,7 +172,10 @@ mach_init(int argc, char *argv[], u_int
{
const char *cp;
int i;
- paddr_t kernstartpfn, kernendpfn, first, last;
+#if 0
+ paddr_t kernstartpfn;
+#endif
+ paddr_t first, last, kernendpfn;
char *kernend;
#if NKSYMS > 0 || defined(DDB) || defined(MODULAR)
char *ssym = NULL;
@@ -367,10 +370,10 @@ mach_init(int argc, char *argv[], u_int
/*
* Load the rest of the pages into the VM system.
*/
- kernstartpfn = atop(trunc_page(
- MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE)));
kernendpfn = atop(round_page(MIPS_KSEG0_TO_PHYS(kernend)));
#if 0
+ kernstartpfn = atop(trunc_page(
+ MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE)));
/* give all free memory to VM */
/* XXX - currently doesn't work, due to "panic: pmap_enter: pmap" */
for (i = 0; i < mem_cluster_cnt; i++) {
Index: src/sys/arch/arc/jazz/fd.c
diff -u src/sys/arch/arc/jazz/fd.c:1.41 src/sys/arch/arc/jazz/fd.c:1.42
--- src/sys/arch/arc/jazz/fd.c:1.41 Fri Jul 1 19:25:41 2011
+++ src/sys/arch/arc/jazz/fd.c Mon Dec 16 15:46:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.41 2011/07/01 19:25:41 dyoung Exp $ */
+/* $NetBSD: fd.c,v 1.42 2013/12/16 15:46:57 mrg Exp $ */
/* $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $ */
/* NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp */
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.41 2011/07/01 19:25:41 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.42 2013/12/16 15:46:57 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -245,12 +245,8 @@ void
fdcattach(struct fdc_softc *fdc)
{
struct fdc_attach_args fa;
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
int type;
- iot = fdc->sc_iot;
- ioh = fdc->sc_ioh;
callout_init(&fdc->sc_timo_ch, 0);
callout_init(&fdc->sc_intr_ch, 0);