Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/next68k - use cpu_{g,s}etmodel



details:   https://anonhg.NetBSD.org/src/rev/53cf41edd172
branches:  trunk
changeset: 328048:53cf41edd172
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 24 20:01:03 2014 +0000

description:
- use cpu_{g,s}etmodel
- fix unused

diffstat:

 sys/arch/next68k/dev/mb8795.c      |   7 +++++--
 sys/arch/next68k/dev/nextkbd.c     |   6 +++---
 sys/arch/next68k/next68k/machdep.c |  17 ++++-------------
 sys/arch/next68k/next68k/rtc.c     |   9 +++++----
 sys/arch/next68k/next68k/trap.c    |   7 +++----
 5 files changed, 20 insertions(+), 26 deletions(-)

diffs (210 lines):

diff -r b80cf87a3b73 -r 53cf41edd172 sys/arch/next68k/dev/mb8795.c
--- a/sys/arch/next68k/dev/mb8795.c     Mon Mar 24 19:58:04 2014 +0000
+++ b/sys/arch/next68k/dev/mb8795.c     Mon Mar 24 20:01:03 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $  */
+/*     $NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $     */
 /*
  * Copyright (c) 1998 Darrin B. Jewell
  * All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.51 2012/10/27 17:18:05 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mb8795.c,v 1.52 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_inet.h"
 
@@ -254,6 +254,7 @@
 
        rxstat = MB_READ_REG(sc, MB8795_RXSTAT);
        rxmask = MB_READ_REG(sc, MB8795_RXMASK);
+       __USE(rxmask);
 
        MB_WRITE_REG(sc, MB8795_RXSTAT, MB8795_RXSTAT_CLEAR);
 
@@ -376,6 +377,7 @@
        panic ("tint");
        txstat = MB_READ_REG(sc, MB8795_TXSTAT);
        txmask = MB_READ_REG(sc, MB8795_TXMASK);
+       __USE(txmask);
 
        if ((txstat & MB8795_TXSTAT_READY) ||
            (txstat & MB8795_TXSTAT_TXRECV)) {
@@ -764,6 +766,7 @@
 
        MB_WRITE_REG(sc, MB8795_TXSTAT, MB8795_TXSTAT_CLEAR);
        txmask = MB_READ_REG(sc, MB8795_TXMASK);
+       __USE(txmask);
        /* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_READYIE); */
        /* MB_WRITE_REG(sc, MB8795_TXMASK, txmask | MB8795_TXMASK_TXRXIE); */
 
diff -r b80cf87a3b73 -r 53cf41edd172 sys/arch/next68k/dev/nextkbd.c
--- a/sys/arch/next68k/dev/nextkbd.c    Mon Mar 24 19:58:04 2014 +0000
+++ b/sys/arch/next68k/dev/nextkbd.c    Mon Mar 24 20:01:03 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $ */
+/* $NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $ */
 /*
  * Copyright (c) 1998 Matt DeBergalis
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nextkbd.c,v 1.14 2012/10/27 17:18:07 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nextkbd.c,v 1.15 2014/03/24 20:01:03 christos Exp $");
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
@@ -331,7 +331,7 @@
 nextkbd_read_data(struct nextkbd_internal *id)
 {
        unsigned char device;
-       struct mon_regs stat;
+       struct mon_regs stat = { 0 };
                                
        bus_space_read_region_4(id->iot, id->ioh, 0, &stat, 3);
        if ((stat.mon_csr & CSR_INT) && (stat.mon_csr & CSR_DATA)) {
diff -r b80cf87a3b73 -r 53cf41edd172 sys/arch/next68k/next68k/machdep.c
--- a/sys/arch/next68k/next68k/machdep.c        Mon Mar 24 19:58:04 2014 +0000
+++ b/sys/arch/next68k/next68k/machdep.c        Mon Mar 24 20:01:03 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $   */
+/*     $NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $   */
 
 /*
  * Copyright (c) 1998 Darrin B. Jewell
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -74,6 +74,7 @@
 #include <sys/kgdb.h>
 #endif
 #include <sys/boot_flag.h>
+#include <sys/cpu.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -314,10 +315,7 @@
 void
 identifycpu(void)
 {
-/*###317 [cc] error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token%%%*/
-       const char *mc, *mmu_str *fpu_str, *cache_str;
-/*###318 [cc] error: unused variable 'len' [-Werror=unused-variable]%%%*/
-       int len;
+       const char *mc, *mmu_str, *fpu_str, *cache_str;
 
        /*
         * ...and the CPU type.
@@ -343,8 +341,6 @@
        switch (mmutype) {
        case MMU_68040:
        case MMU_68030:
-/*###344 [cc] error: 'mmu_str' undeclared (first use in this function)%%%*/
-/*###344 [cc] note: each undeclared identifier is reported only once for each function it appears in%%%*/
                mmu_str = "+MMU";
                break;
        case MMU_68851:
@@ -363,7 +359,6 @@
         */
        switch (fputype) {
        case FPU_68040:
-/*###362 [cc] error: 'fpu_str' undeclared (first use in this function)%%%*/
                fpu_str = "+FPU";
                break;
        case FPU_68882:
@@ -380,7 +375,6 @@
         * ...and finally, the cache type.
         */
        if (cputype == CPU_68040)
-/*###378 [cc] error: 'cache_str' undeclared (first use in this function)%%%*/
                cache_str = ", 4k on-chip physical I/D caches";
        else {
 #if defined(ENABLE_HP_CODE)
@@ -400,10 +394,7 @@
 #endif
        }
 
-/*###397 [cc] error: implicit declaration of function 'cpu_setmodel' [-Werror=implicit-function-declaration]%%%*/
        cpu_setmodel("NeXT/MC680%s CPU%s%s%s", mc, mmu_str, fpu_str, cache_str);
-/*###398 [cc] error: implicit declaration of function 'cpu_getmodel' [-Werror=implicit-function-declaration]%%%*/
-/*###398 [cc] error: format '%s' expects argument of type 'char *', but argument 2 has type 'int' [-Werror=format=]%%%*/
        printf("%s\n", cpu_getmodel());
 
        return;
diff -r b80cf87a3b73 -r 53cf41edd172 sys/arch/next68k/next68k/rtc.c
--- a/sys/arch/next68k/next68k/rtc.c    Mon Mar 24 19:58:04 2014 +0000
+++ b/sys/arch/next68k/next68k/rtc.c    Mon Mar 24 20:01:03 2014 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $        */
+/*      $NetBSD: rtc.c,v 1.17 2014/03/24 20:01:03 christos Exp $        */
 /*
  * Copyright (c) 1998 Darrin Jewell
  * Copyright (c) 1997 Rolf Grossmann 
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.16 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.17 2014/03/24 20:01:03 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>          /* for panic */
@@ -272,8 +272,6 @@
 {
        u_char h, y;
        
-/*###275 [cc] error: variable 'val' set but not used [-Werror=unused-but-set-variable]%%%*/
-       struct clock_ymdhms val;
        y = FROMBCD(rtc_read(RTC_YR));
        if (y >= 69) {
                dt->dt_year = 1900+y;
@@ -293,8 +291,11 @@
                } else {  /* am */
                        if (dt->dt_hour == 12) dt->dt_hour = 0;
                }
+#ifdef notdef
        } else {        /* time is 24 hour format */
+               struct clock_ymdhms val;
                val.dt_hour = FROMBCD(h & 0x3f);
+#endif
        }
 
        dt->dt_min      = FROMBCD(rtc_read(RTC_MIN)&0x7f);
diff -r b80cf87a3b73 -r 53cf41edd172 sys/arch/next68k/next68k/trap.c
--- a/sys/arch/next68k/next68k/trap.c   Mon Mar 24 19:58:04 2014 +0000
+++ b/sys/arch/next68k/next68k/trap.c   Mon Mar 24 20:01:03 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $       */
+/*     $NetBSD: trap.c,v 1.87 2014/03/24 20:01:03 christos Exp $       */
 
 /*
  * This file was taken from mvme68k/mvme68k/trap.c
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.86 2014/03/24 19:58:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.87 2014/03/24 20:01:03 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -270,8 +270,7 @@
        int s;
        int rv;
        u_quad_t sticks = 0 /* XXX initialiser works around compiler bug */;
-/*###273 [cc] error: variable 'panicking' set but not used [-Werror=unused-but-set-variable]%%%*/
-       static int panicking = 0;
+       static int panicking __diagused;
 
        curcpu()->ci_data.cpu_ntrap++;
        l = curlwp;



Home | Main Index | Thread Index | Old Index