Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/atari - remove unused



details:   https://anonhg.NetBSD.org/src/rev/c844168ac15b
branches:  trunk
changeset: 328033:c844168ac15b
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 24 18:39:57 2014 +0000

description:
- remove unused
- use cpu_{g,s}etmodel() (not committed yet)

diffstat:

 sys/arch/atari/atari/autoconf.c |   6 ++----
 sys/arch/atari/atari/machdep.c  |  16 ++++++----------
 sys/arch/atari/dev/atari5380.c  |   8 +++-----
 sys/arch/atari/dev/clock.c      |   7 ++-----
 sys/arch/atari/dev/ite.c        |  16 ++++------------
 sys/arch/atari/dev/kbd.c        |   6 ++++--
 sys/arch/atari/dev/ncr5380.c    |   9 +++------
 sys/arch/atari/dev/ser.c        |   5 +++--
 sys/arch/atari/dev/zs.c         |   5 +++--
 9 files changed, 30 insertions(+), 48 deletions(-)

diffs (truncated from 364 to 300 lines):

diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/atari/autoconf.c
--- a/sys/arch/atari/atari/autoconf.c   Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/atari/autoconf.c   Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.64 2012/10/27 17:17:42 chs Exp $        */
+/*     $NetBSD: autoconf.c,v 1.65 2014/03/24 18:39:57 christos Exp $   */
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.64 2012/10/27 17:17:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.65 2014/03/24 18:39:57 christos Exp $");
 
 #include "opt_md.h"
 
@@ -95,14 +95,12 @@
 
        if ((boothowto & RB_ASKNAME) != 0) {
                int md_major, i;
-               dev_t md_dev;
                cfdata_t cf;
                struct md_softc *sc;
 
                md_major = devsw_name2blk("md", NULL, 0);
                if (md_major >= 0) {
                        for (i = 0; i < RAMD_NDEV; i++) {
-                               md_dev = MAKEDISKDEV(md_major, i, RAW_PART);
                                cf = malloc(sizeof(*cf), M_DEVBUF,
                                    M_ZERO|M_WAITOK);
                                if (cf == NULL)
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/atari/machdep.c
--- a/sys/arch/atari/atari/machdep.c    Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/atari/machdep.c    Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.175 2012/08/10 17:43:32 tsutsui Exp $    */
+/*     $NetBSD: machdep.c,v 1.176 2014/03/24 18:39:57 christos Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175 2012/08/10 17:43:32 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.176 2014/03/24 18:39:57 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -232,8 +232,6 @@
 /*
  * Info for CTL_HW
  */
-char cpu_model[120];
- 
 static void
 identifycpu(void)
 {
@@ -288,8 +286,8 @@
                cpu = "m68020";
                mmu = " m68851 MMU";
        }
-       sprintf(cpu_model, "%s (%s CPU%s%sFPU)", mach, cpu, mmu, fpu);
-       printf("%s\n", cpu_model);
+       cpu_setmodel("%s (%s CPU%s%sFPU)", mach, cpu, mmu, fpu);
+       printf("%s\n", cpu_getmodel());
 }
 
 /*
@@ -570,12 +568,9 @@
 int
 badbaddr(void *addr, int size)
 {
-       register int i;
+       int i;
        label_t faultbuf;
 
-#ifdef lint
-       i = *addr; if (i) return(0);
-#endif
        nofault = (int *) &faultbuf;
        if (setjmp((label_t *)nofault)) {
                nofault = (int *) 0;
@@ -594,6 +589,7 @@
        default:
                panic("badbaddr: unknown size");
        }
+       __USE(i);
        nofault = (int *)0;
        return 0;
 }
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/dev/atari5380.c
--- a/sys/arch/atari/dev/atari5380.c    Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/dev/atari5380.c    Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atari5380.c,v 1.59 2012/02/12 16:34:07 matt Exp $      */
+/*     $NetBSD: atari5380.c,v 1.60 2014/03/24 18:39:57 christos Exp $  */
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.59 2012/02/12 16:34:07 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari5380.c,v 1.60 2014/03/24 18:39:57 christos Exp $");
 
 #include "opt_atariscsi.h"
 
@@ -325,10 +325,8 @@
 static inline void
 scsi_tt_clr_ipend(void)
 {
-       int tmp;
-
        SCSI_DMA->s_dma_ctrl = 0;
-       tmp = GET_TT_REG(NCR5380_IRCV);
+       GET_TT_REG(NCR5380_IRCV);
        if (machineid & ATARI_TT)
                MFP2->mf_iprb = (uint8_t)~IB_SCDM;
        MFP2->mf_ipra = (uint8_t)~IA_SCSI;
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/dev/clock.c
--- a/sys/arch/atari/dev/clock.c        Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/dev/clock.c        Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.56 2014/03/16 05:20:23 dholland Exp $      */
+/*     $NetBSD: clock.c,v 1.57 2014/03/24 18:39:57 christos Exp $      */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.56 2014/03/16 05:20:23 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.57 2014/03/24 18:39:57 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -511,13 +511,10 @@
 int
 rtcread(dev_t dev, struct uio *uio, int flags)
 {
-       struct clock_softc      *sc;
        mc_todregs              clkregs;
        int                     s, length;
        char                    buffer[16 + 1];
 
-       sc = device_lookup_private(&clock_cd, minor(dev));
-
        s = splhigh();
        MC146818_GETTOD(RTC, &clkregs);
        splx(s);
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/dev/ite.c
--- a/sys/arch/atari/dev/ite.c  Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/dev/ite.c  Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ite.c,v 1.73 2014/03/16 05:20:23 dholland Exp $        */
+/*     $NetBSD: ite.c,v 1.74 2014/03/24 18:39:57 christos Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.73 2014/03/16 05:20:23 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.74 2014/03/24 18:39:57 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -593,12 +593,9 @@
 itestart(struct tty *tp)
 {
        struct clist *rbp;
-       struct ite_softc *sc;
        u_char buf[ITEBURST];
        int s, len;
 
-       sc = getitesp(tp->t_dev);
-
        KDASSERT(tp);
 
        s = spltty(); {
@@ -629,9 +626,6 @@
 ite_on(dev_t dev, int flag)
 {
        struct ite_softc *sc;
-       int unit;
-
-       unit = ITEUNIT(dev);
        sc = getitesp(dev); 
 
        /* force ite active, overriding graphics mode */
@@ -758,13 +752,12 @@
 {
        struct key      key;
        struct kbdmap   *kbdmap;
-       u_char          code, up, mask;
+       u_char          code, up;
        int             s;
 
        up   = KBD_RELEASED(c);
        c    = KBD_SCANCODE(c);
        code = 0;
-       mask = 0;
        kbdmap = (kbd_ite == NULL) ? &ascii_kbdmap : kbd_ite->kbdmap;
 
        s = spltty();
@@ -858,7 +851,7 @@
 {
        struct tty      *kbd_tty;
        struct kbdmap   *kbdmap;
-       u_char          code, *str, up, mask;
+       u_char          code, *str, up;
        struct key      key;
        int             s, i;
        static bool     again;
@@ -878,7 +871,6 @@
        up   = KBD_RELEASED(c);
        c    = KBD_SCANCODE(c);
        code = 0;
-       mask = 0;
 
        /* have to make sure we're at spltty in here */
        s = spltty();
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/dev/kbd.c
--- a/sys/arch/atari/dev/kbd.c  Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/dev/kbd.c  Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kbd.c,v 1.43 2014/03/16 05:20:23 dholland Exp $        */
+/*     $NetBSD: kbd.c,v 1.44 2014/03/24 18:39:57 christos Exp $        */
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.43 2014/03/16 05:20:23 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.44 2014/03/24 18:39:57 christos Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -265,6 +265,7 @@
         */
        while (KBD->ac_cs & (A_IRQ|A_RXRDY))
                code = KBD->ac_da;
+       __USE(code);
        /*
         * Enable interrupts from MFP
         */
@@ -401,6 +402,7 @@
                }
                kbd_ring[kbd_rbput++ & KBD_RING_MASK] = KBD->ac_da;
        }
+       __USE(code);
 
        /*
         * If characters are waiting for transmit, send them.
diff -r edacffaa3dd7 -r c844168ac15b sys/arch/atari/dev/ncr5380.c
--- a/sys/arch/atari/dev/ncr5380.c      Mon Mar 24 14:15:37 2014 +0000
+++ b/sys/arch/atari/dev/ncr5380.c      Mon Mar 24 18:39:57 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr5380.c,v 1.70 2012/10/27 17:17:43 chs Exp $ */
+/*     $NetBSD: ncr5380.c,v 1.71 2014/03/24 18:39:57 christos Exp $    */
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.70 2012/10/27 17:17:43 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ncr5380.c,v 1.71 2014/03/24 18:39:57 christos Exp $");
 
 /*
  * Bit mask of targets you want debugging to be shown
@@ -266,7 +266,6 @@
     void *arg)
 {
        struct scsipi_xfer *xs;
-       struct scsipi_periph *periph;
        struct ncr_softc *sc;
        int     sps;
        SC_REQ  *reqp, *link, *tmp;
@@ -277,7 +276,6 @@
        switch (req) {
        case ADAPTER_REQ_RUN_XFER:
                xs = arg;
-               periph = xs->xs_periph;
 
                /*
                 * We do not queue RESET commands
@@ -1664,7 +1662,6 @@
 reach_msg_out(struct ncr_softc *sc, u_long len)
 {
        uint8_t phase;



Home | Main Index | Thread Index | Old Index