Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pc532/stand Make WARNS=2 friendly.



details:   https://anonhg.NetBSD.org/src/rev/537299dfb3f1
branches:  trunk
changeset: 556034:537299dfb3f1
user:      simonb <simonb%NetBSD.org@localhost>
date:      Sat Dec 06 14:02:40 2003 +0000

description:
Make WARNS=2 friendly.

diffstat:

 sys/arch/pc532/stand/boot/boot.c       |   6 +++---
 sys/arch/pc532/stand/common/consdefs.h |   8 +++++++-
 sys/arch/pc532/stand/common/machdep.c  |   6 +++---
 sys/arch/pc532/stand/common/md.c       |   4 ++--
 sys/arch/pc532/stand/common/prf.c      |   3 ++-
 sys/arch/pc532/stand/common/scn.c      |  12 +++++++++---
 sys/arch/pc532/stand/common/scsi_hi.c  |  14 +++++++++-----
 sys/arch/pc532/stand/common/scsi_low.c |  17 ++++++++++++-----
 sys/arch/pc532/stand/common/sd.c       |  29 +++++++++++++++++++----------
 sys/arch/pc532/stand/common/so.h       |   6 ++++--
 10 files changed, 70 insertions(+), 35 deletions(-)

diffs (truncated from 399 to 300 lines):

diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/boot/boot.c
--- a/sys/arch/pc532/stand/boot/boot.c  Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/boot/boot.c  Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.5 2003/12/06 13:09:01 simonb Exp $  */
+/*     $NetBSD: boot.c,v 1.6 2003/12/06 14:02:40 simonb Exp $  */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -99,7 +99,7 @@
 }
 
 void
-getbootdev(int *howto)
+getbootdev(int *how_to)
 {
        char c, *ptr = line;
 
@@ -114,7 +114,7 @@
                                return;
                        if (c == '-')
                                while ((c = *++ptr) && c != ' ')
-                                       BOOT_FLAG(c, *howto);
+                                       BOOT_FLAG(c, *how_to);
                        else {
                                name = ptr;
                                while ((c = *++ptr) && c != ' ');
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/consdefs.h
--- a/sys/arch/pc532/stand/common/consdefs.h    Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/consdefs.h    Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consdefs.h,v 1.3 2003/12/06 13:09:01 simonb Exp $      */
+/*     $NetBSD: consdefs.h,v 1.4 2003/12/06 14:02:40 simonb Exp $      */
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -32,7 +32,13 @@
 /*
  * Console routine prototypes.
  */
+void   cninit(void);
+int    cngetc(void);
+int    cnputc(int);
+
 #ifdef SCNCONSOLE
+struct consdev;
+
 void   scnprobe(struct consdev *);
 void   scninit(struct consdev *);
 int    scngetchar(dev_t);
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/machdep.c
--- a/sys/arch/pc532/stand/common/machdep.c     Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/machdep.c     Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.4 2003/12/06 13:09:01 simonb Exp $       */
+/*     $NetBSD: machdep.c,v 1.5 2003/12/06 14:02:40 simonb Exp $       */
 
 /*
  * Copyright (c) 1994 Philip L. Budne.
@@ -72,7 +72,7 @@
 }
 
 void
-machdep_start(char *entry, int howto, char *loadaddr, char *ssym, char *esym)
+machdep_start(char *entry, int how_to, char *loadaddr, char *ssym, char *esym)
 {
        char *load;
        extern u_int opendev;
@@ -90,7 +90,7 @@
 
        printf("\n");
 
-       run_prog((u_long)howto,         /* r7 */
+       run_prog((u_long)how_to,        /* r7 */
                 (u_long)opendev,       /* r6 */
                 (u_long)load,          /* r5 */
                 (u_long)esym,          /* r4 */
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/md.c
--- a/sys/arch/pc532/stand/common/md.c  Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/md.c  Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.3 2003/12/06 13:09:01 simonb Exp $    */
+/*     $NetBSD: md.c,v 1.4 2003/12/06 14:02:40 simonb Exp $    */
 
 /*
  * Copyright (c) 1994 Matthias Pfaller.
@@ -66,7 +66,7 @@
     u_int *rsize)
 {
 
-       memcpy(buf, ss + (dblk << DEV_BSHIFT), size);
+       memcpy(buf, (char *)ss + (dblk << DEV_BSHIFT), size);
        *rsize = size;
        return(0);
 }
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/prf.c
--- a/sys/arch/pc532/stand/common/prf.c Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/prf.c Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prf.c,v 1.3 2003/12/06 13:09:01 simonb Exp $   */
+/*     $NetBSD: prf.c,v 1.4 2003/12/06 14:02:40 simonb Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -33,6 +33,7 @@
 
 #include <lib/libsa/stand.h>
 
+#include <pc532/stand/common/consdefs.h>
 #include <pc532/stand/common/samachdep.h>
 
 int
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/scn.c
--- a/sys/arch/pc532/stand/common/scn.c Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/scn.c Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scn.c,v 1.2 2003/12/06 13:09:01 simonb Exp $   */
+/*     $NetBSD: scn.c,v 1.3 2003/12/06 14:02:40 simonb Exp $   */
 
 /*-
  * Copyright (c) 1994 Philip L. Budne.
@@ -41,6 +41,8 @@
 #include <sys/types.h>
 #include <dev/cons.h>
 
+#include <pc532/stand/common/consdefs.h>
+
 #define        DUART   0x28000000
 
 /* registers */
@@ -57,6 +59,7 @@
 
 u_char * volatile scncnaddr = (u_char *) DUART + 8 * SCNCNUNIT;
 
+void
 scnprobe(struct consdev *cp)
 {
 
@@ -64,13 +67,15 @@
        cp->cn_pri = CN_NORMAL;         /* XXX remote? */
 }
 
+void
 scninit(struct consdev *cp)
 {
 
        /* leave things the way the PROM set them */
 }
 
-scngetchar(struct consdev *cp)
+int
+scngetchar(dev_t dev)
 {
 
        if ((scncnaddr[SCN_STAT] & STAT_RXRDY) == 0)
@@ -78,7 +83,8 @@
        return(scncnaddr[SCN_DATA]);
 }
 
-scnputchar(struct consdev *cp, int c)
+void
+scnputchar(dev_t dev, int c)
 {
        int timo;
        short stat;
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/scsi_hi.c
--- a/sys/arch/pc532/stand/common/scsi_hi.c     Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/scsi_hi.c     Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi_hi.c,v 1.2 2003/12/06 13:09:01 simonb Exp $       */
+/*     $NetBSD: scsi_hi.c,v 1.3 2003/12/06 14:02:40 simonb Exp $       */
 
 /****************************************************************************
  * NS32K Monitor SCSI high-level driver
@@ -76,11 +76,15 @@
 #define        IDATA_IX        1
 PRIVATE struct scsi_args scsi_args;
 
+int sc_initialize (struct drive *);
+PRIVATE int exec_scsi_hi(const U8 *, U8 *, const U8 *, struct drive *);
+PRIVATE int get_sense(struct drive *);
+
 /*===========================================================================*
  *                             sc_rdwt                                      *
  *===========================================================================*/
 /* Carry out a read or write request for the SCSI disk. */
-PRIVATE int
+PUBLIC int
 sc_rdwt(int op, int block, void *ram_adr, int len, int sc_adr, int lun)
 {
        int retries, ret;
@@ -140,7 +144,7 @@
 /* Execute the list of initialization commands for the given drive.
  */
 int
-sc_initialize (struct drive *dp)
+sc_initialize(struct drive *dp)
 {
        const struct cmd_desc *cp;
 
@@ -160,7 +164,7 @@
  * command and, if it fails, execute a request sense to find out why.
  */
 PRIVATE int
-exec_scsi_hi(U8 *cmd, U8 *data_in, U8 *data_out, struct drive *dp)
+exec_scsi_hi(const U8 *cmd, U8 *data_in, const U8 *data_out, struct drive *dp)
 {
 
        scsi_args.ptr[CMD_IX] = (long)cmd;
@@ -209,7 +213,7 @@
   (sense_buf[1]<<16 | sense_buf[2]<<8 | sense_buf[3])
 
 PRIVATE int
-get_sense (struct drive *dp)
+get_sense(struct drive *dp)
 {
        U8 *p;
 
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/scsi_low.c
--- a/sys/arch/pc532/stand/common/scsi_low.c    Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/scsi_low.c    Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi_low.c,v 1.3 2003/12/06 13:09:01 simonb Exp $      */
+/*     $NetBSD: scsi_low.c,v 1.4 2003/12/06 14:02:40 simonb Exp $      */
 
 /****************************************************************************
  * NS32K Monitor SCSI low-level driver
@@ -91,7 +91,7 @@
 #define        SC_LOG_LEN      32
 
 PRIVATE struct scsi_args       *sc_ptrs;
-PRIVATE char                   sc_cur_phase,
+PRIVATE unsigned char          sc_cur_phase,
                                sc_reset_done = 1,
                                sc_have_msg,
                                sc_accept_int,
@@ -120,6 +120,12 @@
 };
 
 PRIVATE void sc_reset(void);
+void scCtlrSelect(int);
+PRIVATE int sc_wait_bus_free(void);
+void sc_dma_setup(int, long);
+int sc_receive(void);
+PRIVATE int sc_select(long);
+PUBLIC int scsi_interrupt(void);
 
 /*===========================================================================*
  *                             exec_scsi_low                                *
@@ -269,8 +275,7 @@
  *===========================================================================*/
 /* SCSI interrupt handler.
  */
-PUBLIC
-int
+PUBLIC int
 scsi_interrupt(void)
 {
        unsigned char stat2, dummy;
@@ -393,7 +398,8 @@
  *     than the first bytes read from the SCSI controller) by the
  *     pseudo-DMA loop in sc_receive().
  */
-sc_dma_setup (int dir, long adr)
+void
+sc_dma_setup(int dir, long adr)
 {
 
        if (sc_dma_port > SC_DMA + MAX_CACHE)
@@ -437,6 +443,7 @@
  *===========================================================================*/
 /* Select a SCSI device.
  */
+void
 scCtlrSelect(int ctlr)
 {
        RD_ADR(ICU_IO) &= ~ICU_SCSI_BIT;        /* i/o, not port */
diff -r 1850b4845a6b -r 537299dfb3f1 sys/arch/pc532/stand/common/sd.c
--- a/sys/arch/pc532/stand/common/sd.c  Sat Dec 06 13:09:01 2003 +0000
+++ b/sys/arch/pc532/stand/common/sd.c  Sat Dec 06 14:02:40 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.4 2003/12/06 13:09:01 simonb Exp $    */
+/*     $NetBSD: sd.c,v 1.5 2003/12/06 14:02:40 simonb Exp $    */
 
 /*
  * Copyright (c) 1990, 1993
@@ -89,6 +89,7 @@
 #include <lib/libsa/stand.h>
 
 #include <pc532/stand/common/samachdep.h>
+#include <pc532/stand/common/so.h>
 
 struct sd_softc {
        int     sc_ctlr;
@@ -105,6 +106,11 @@
 
 #define        SDRETRY         2
 
+int    sdinit(int, int);
+void   sdreset(int, int);



Home | Main Index | Thread Index | Old Index