[Midnightbsd-cvs] src [8440] trunk/sys/dev: use ansi prototype to fix build

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 18 17:46:34 EDT 2016


Revision: 8440
          http://svnweb.midnightbsd.org/src/?rev=8440
Author:   laffer1
Date:     2016-09-18 17:46:34 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
use ansi prototype to fix build

Modified Paths:
--------------
    trunk/sys/dev/ct/bshw_machdep.c
    trunk/sys/dev/ct/ct.c
    trunk/sys/dev/ct/ct_isa.c
    trunk/sys/dev/ct/ct_machdep.h
    trunk/sys/dev/snc/dp83932.c
    trunk/sys/dev/snc/dp83932subr.c
    trunk/sys/dev/snc/if_snc.c
    trunk/sys/dev/snc/if_snc_cbus.c

Modified: trunk/sys/dev/ct/bshw_machdep.c
===================================================================
--- trunk/sys/dev/ct/bshw_machdep.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/ct/bshw_machdep.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ct/bshw_machdep.c,v 1.3 2012/08/06 01:22:08 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*	$NecBSD: bshw_machdep.c,v 1.8.12.6 2001/06/29 06:28:05 honda Exp $	*/
 
 #include <sys/cdefs.h>
@@ -113,9 +113,7 @@
  * GENERIC MACHDEP FUNCTIONS
  *********************************************************/
 void
-bshw_synch_setup(ct, ti)
-	struct ct_softc *ct;
-	struct targ_info *ti;
+bshw_synch_setup(struct ct_softc *ct, struct targ_info *ti)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	struct ct_targ_info *cti = (void *) ti;
@@ -134,8 +132,7 @@
 }
 
 void
-bshw_bus_reset(ct)
-	struct ct_softc *ct;
+bshw_bus_reset(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -183,9 +180,7 @@
 
 /* probe */
 int
-bshw_read_settings(chp, bs)
-	struct ct_bus_access_handle *chp;
-	struct bshw_softc *bs;
+bshw_read_settings(struct ct_bus_access_handle *chp, struct bshw_softc *bs)
 {
 	static int irq_tbl[] = { 3, 5, 6, 9, 12, 13 };
 
@@ -217,8 +212,7 @@
 static int bshw_lc_smit_fstat(struct ct_softc *, int, int);
 
 static __inline void
-bshw_lc_smit_stop(ct)
-	struct ct_softc *ct;
+bshw_lc_smit_stop(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -227,10 +221,7 @@
 }
 
 static __inline void
-bshw_lc_smit_start(ct, count, direction)
-	struct ct_softc *ct;
-	int count;
-	u_int direction;
+bshw_lc_smit_start(struct ct_softc *ct, int count, u_int direction)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	u_int8_t pval, val;
@@ -246,9 +237,7 @@
 }
 
 static int
-bshw_lc_smit_fstat(ct, wc, read)
-	struct ct_softc *ct;
-	int wc, read;
+bshw_lc_smit_fstat(struct ct_softc *ct, int wc, int read)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	u_int8_t stat;
@@ -278,8 +267,7 @@
 }
 
 void
-bshw_smit_xfer_stop(ct)
-	struct ct_softc *ct;
+bshw_smit_xfer_stop(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct bshw_softc *bs = ct->ct_hw;
@@ -325,8 +313,7 @@
 }
 
 int
-bshw_smit_xfer_start(ct)
-	struct ct_softc *ct;
+bshw_smit_xfer_start(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -429,8 +416,7 @@
 static void bshw_dmadone(struct ct_softc *);
 
 int
-bshw_dma_xfer_start(ct)
-	struct ct_softc *ct;
+bshw_dma_xfer_start(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct sc_p *sp = &slp->sl_scp;
@@ -491,8 +477,7 @@
 }
 
 void
-bshw_dma_xfer_stop(ct)
-	struct ct_softc *ct;
+bshw_dma_xfer_stop(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct sc_p *sp = &slp->sl_scp;
@@ -555,10 +540,8 @@
 static bus_addr_t dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
 
 static __inline void 
-bshw_dma_write_1(chp, port, val)
-	struct ct_bus_access_handle *chp;
-	bus_addr_t port;
-	u_int8_t val;
+bshw_dma_write_1(struct ct_bus_access_handle *chp, bus_addr_t port, 
+    u_int8_t val)
 {
 
 	CT_BUS_WEIGHT(chp);
@@ -566,8 +549,7 @@
 }
 
 static void
-bshw_dmastart(ct)
-	struct ct_softc *ct;
+bshw_dmastart(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct bshw_softc *bs = ct->ct_hw;
@@ -613,8 +595,7 @@
 }
 
 static void
-bshw_dmadone(ct)
-	struct ct_softc *ct;
+bshw_dmadone(struct ct_softc *ct)
 {
 	struct bshw_softc *bs = ct->ct_hw;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -641,8 +622,7 @@
 static void bshw_dma_stop_elecom(struct ct_softc *);
 
 static int
-bshw_dma_init_texa(ct)
-	struct ct_softc *ct;
+bshw_dma_init_texa(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	u_int8_t regval;
@@ -657,8 +637,7 @@
 }
 
 static int
-bshw_dma_init_sc98(ct)
-	struct ct_softc *ct;
+bshw_dma_init_sc98(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -684,8 +663,7 @@
 }
 
 static void
-bshw_dma_start_sc98(ct)
-	struct ct_softc *ct;
+bshw_dma_start_sc98(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -694,8 +672,7 @@
 }
 
 static void
-bshw_dma_stop_sc98(ct)
-	struct ct_softc *ct;
+bshw_dma_stop_sc98(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -704,8 +681,7 @@
 }
 
 static void
-bshw_dma_start_elecom(ct)
-	struct ct_softc *ct;
+bshw_dma_start_elecom(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	u_int8_t tmp = ct_cr_read_1(chp, 0x4c);
@@ -714,8 +690,7 @@
 }
 
 static void
-bshw_dma_stop_elecom(ct)
-	struct ct_softc *ct;
+bshw_dma_stop_elecom(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	u_int8_t tmp = ct_cr_read_1(chp, 0x4c);

Modified: trunk/sys/dev/ct/ct.c
===================================================================
--- trunk/sys/dev/ct/ct.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/ct/ct.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ct/ct.c,v 1.3 2012/08/06 01:22:08 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*	$NecBSD: ct.c,v 1.13.12.5 2001/06/26 07:31:53 honda Exp $	*/
 
 #include <sys/cdefs.h>
@@ -193,9 +193,7 @@
  * HW functions
  **************************************************/
 static __inline void
-cthw_phase_bypass(ct, ph)
-	struct ct_softc *ct;
-	u_int8_t ph;
+cthw_phase_bypass(struct ct_softc *ct, u_int8_t ph)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -204,8 +202,7 @@
 }
 
 static void
-cthw_bus_reset(ct)
-	struct ct_softc *ct;
+cthw_bus_reset(struct ct_softc *ct)
 {
 
 	/*
@@ -216,10 +213,8 @@
 }
 
 static int
-cthw_chip_reset(chp, chiprevp, chipclk, hostid)
-	struct ct_bus_access_handle *chp;
-	int *chiprevp;
-	int chipclk, hostid;
+cthw_chip_reset(struct ct_bus_access_handle *chp, int *chiprevp, int chipclk,
+    int hostid)
 {
 #define	CT_SELTIMEOUT_20MHz_REGV	(0x80)
 	u_int8_t aux, regv;
@@ -314,8 +309,7 @@
 }
 
 static struct ct_synch_data *
-ct_make_synch_table(ct)
-	struct ct_softc *ct;
+ct_make_synch_table(struct ct_softc *ct)
 {
 	struct ct_synch_data *sdtp, *sdp;
 	u_int base, i, period;
@@ -358,11 +352,8 @@
  * Attach & Probe
  **************************************************/
 int
-ctprobesubr(chp, dvcfg, hsid, chipclk, chiprevp)
-	struct ct_bus_access_handle *chp;
-	u_int dvcfg, chipclk;
-	int hsid;
-	int *chiprevp;
+ctprobesubr(struct ct_bus_access_handle *chp, u_int dvcfg, int hsid,
+    u_int chipclk, int *chiprevp)
 {
 
 #if	0
@@ -386,8 +377,7 @@
 }
 
 void
-ctattachsubr(ct)
-	struct ct_softc *ct;
+ctattachsubr(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 
@@ -402,8 +392,7 @@
  * SCSI LOW interface functions
  **************************************************/
 static void
-cthw_attention(ct)
-	struct ct_softc *ct;
+cthw_attention(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 
@@ -420,8 +409,7 @@
 }
 
 static void
-ct_attention(ct)
-	struct ct_softc *ct;
+ct_attention(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 
@@ -438,10 +426,7 @@
 }
 
 static int
-ct_targ_init(ct, ti, action)
-	struct ct_softc *ct;
-	struct targ_info *ti;
-	int action;
+ct_targ_init(struct ct_softc *ct, struct targ_info *ti, int action)
 {
 	struct ct_targ_info *cti = (void *) ti;
 
@@ -478,9 +463,7 @@
 }	
 
 static int
-ct_world_start(ct, fdone)
-	struct ct_softc *ct;
-	int fdone;
+ct_world_start(struct ct_softc *ct, int fdone)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -511,9 +494,7 @@
 }
 
 static int
-ct_start_selection(ct, cb)
-	struct ct_softc *ct;
-	struct slccb *cb;
+ct_start_selection(struct ct_softc *ct, struct slccb *cb)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -585,10 +566,7 @@
 }
 
 static int
-ct_msg(ct, ti, msg)
-	struct ct_softc *ct;
-	struct targ_info *ti;
-	u_int msg;
+ct_msg(struct ct_softc *ct, struct targ_info *ti, u_int msg)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	struct ct_targ_info *cti = (void *) ti;
@@ -640,11 +618,8 @@
  * <DATA PHASE>
  *************************************************/
 static int
-ct_xfer(ct, data, len, direction, statp)
-	struct ct_softc *ct;
-	u_int8_t *data;
-	int len, direction;
-	u_int *statp;
+ct_xfer(struct ct_softc *ct, u_int8_t *data, int len, int direction,
+    u_int *statp)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	int wc;
@@ -704,8 +679,7 @@
 #define	CT_PADDING_BUF_SIZE 32
 
 static void
-ct_io_xfer(ct)
-	struct ct_softc *ct;
+ct_io_xfer(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -757,9 +731,7 @@
 };
 
 static void
-ct_phase_error(ct, scsi_status)
-	struct ct_softc *ct;
-	u_int8_t scsi_status;
+ct_phase_error(struct ct_softc *ct, u_int8_t scsi_status)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct targ_info *ti = slp->sl_Tnexus;
@@ -805,9 +777,7 @@
  * ### SCSI PHASE SEQUENCER ###
  **************************************************/
 static int
-ct_reselected(ct, scsi_status)
-	struct ct_softc *ct;
-	u_int8_t scsi_status;
+ct_reselected(struct ct_softc *ct, u_int8_t scsi_status)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -850,9 +820,7 @@
 }
 
 static int
-ct_target_nexus_establish(ct, lun, dir)
-	struct ct_softc *ct;
-	int lun, dir;
+ct_target_nexus_establish(struct ct_softc *ct, int lun, int dir)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -872,8 +840,7 @@
 }
 
 static int
-ct_lun_nexus_establish(ct)
-	struct ct_softc *ct;
+ct_lun_nexus_establish(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -884,8 +851,7 @@
 }
 
 static int
-ct_ccb_nexus_establish(ct)
-	struct ct_softc *ct;
+ct_ccb_nexus_establish(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -911,8 +877,7 @@
 }
 
 static int
-ct_unbusy(ct)
-	struct ct_softc *ct;
+ct_unbusy(struct ct_softc *ct)
 {
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
@@ -935,8 +900,7 @@
 }
 	
 static int
-ct_catch_intr(ct)
-	struct ct_softc *ct;
+ct_catch_intr(struct ct_softc *ct)
 {
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	int wc;
@@ -954,8 +918,7 @@
 }
 
 int
-ctintr(arg)
-	void *arg;
+ctintr(void *arg)
 {
 	struct ct_softc *ct = arg;
 	struct scsi_low_softc *slp = &ct->sc_sclow;

Modified: trunk/sys/dev/ct/ct_isa.c
===================================================================
--- trunk/sys/dev/ct/ct_isa.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/ct/ct_isa.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ct/ct_isa.c,v 1.3 2012/08/06 01:22:08 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*	$NecBSD: ct_isa.c,v 1.6 1999/07/26 06:32:01 honda Exp $	*/
 
 #include <sys/cdefs.h>
@@ -395,8 +395,7 @@
 }
 
 static void
-ct_isa_bus_access_weight(chp)
-	struct ct_bus_access_handle *chp;
+ct_isa_bus_access_weight(struct ct_bus_access_handle *chp)
 {
 
 	outb(0x5f, 0);
@@ -403,8 +402,7 @@
 }
 
 static void
-ct_isa_dmasync_before(ct)
-	struct ct_softc *ct;
+ct_isa_dmasync_before(struct ct_softc *ct)
 {
 
 	if (need_pre_dma_flush)
@@ -412,8 +410,7 @@
 }
 
 static void
-ct_isa_dmasync_after(ct)
-	struct ct_softc *ct;
+ct_isa_dmasync_after(struct ct_softc *ct)
 {
 
 	if (need_post_dma_flush)

Modified: trunk/sys/dev/ct/ct_machdep.h
===================================================================
--- trunk/sys/dev/ct/ct_machdep.h	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/ct/ct_machdep.h	2016-09-18 21:46:34 UTC (rev 8440)
@@ -91,8 +91,7 @@
 	(struct ct_bus_access_handle *, u_int);
 
 static __inline u_int8_t
-ct_stat_read_1(chp)
-	struct ct_bus_access_handle *chp;
+ct_stat_read_1(struct ct_bus_access_handle *chp)
 {
 	u_int8_t regv;
 
@@ -102,9 +101,7 @@
 }
 
 static __inline void
-cthw_set_count(chp, count)
-	struct ct_bus_access_handle *chp;
-	u_int count;
+cthw_set_count(struct ct_bus_access_handle *chp, u_int count)
 {
 	bus_space_tag_t bst = chp->ch_iot;
 	bus_space_handle_t bsh = chp->ch_ioh;
@@ -120,8 +117,7 @@
 }
 
 static __inline u_int
-cthw_get_count(chp)
-	struct ct_bus_access_handle *chp;
+cthw_get_count(struct ct_bus_access_handle *chp)
 {
 	bus_space_tag_t bst = chp->ch_iot;
 	bus_space_handle_t bsh = chp->ch_ioh;
@@ -139,10 +135,7 @@
 }
 
 static __inline void
-ct_write_cmds(chp, cmd, len)
-	struct ct_bus_access_handle *chp;
-	u_int8_t *cmd;
-	int len;
+ct_write_cmds(struct ct_bus_access_handle *chp, u_int8_t *cmd, int len)
 {
 	bus_space_tag_t bst = chp->ch_iot;
 	bus_space_handle_t bsh = chp->ch_ioh;
@@ -158,9 +151,7 @@
 }	
 
 static __inline u_int8_t
-ct_cr_read_1(chp, offs)
-	struct ct_bus_access_handle *chp;
-	bus_addr_t offs;
+ct_cr_read_1(struct ct_bus_access_handle *chp, bus_addr_t offs)
 {
 	bus_space_tag_t bst = chp->ch_iot;
 	bus_space_handle_t bsh = chp->ch_ioh;
@@ -174,10 +165,7 @@
 }
 
 static __inline void
-ct_cr_write_1(chp, offs, val)
-	struct ct_bus_access_handle *chp;
-	bus_addr_t offs;
-	u_int8_t val;
+ct_cr_write_1(struct ct_bus_access_handle *chp, bus_addr_t offs, u_int8_t val)
 {
 	bus_space_tag_t bst = chp->ch_iot;
 	bus_space_handle_t bsh = chp->ch_ioh;
@@ -189,8 +177,7 @@
 }
 
 static __inline u_int8_t
-ct_cmdp_read_1(chp)
-	struct ct_bus_access_handle *chp;
+ct_cmdp_read_1(struct ct_bus_access_handle *chp)
 {
 	u_int8_t regv;
 
@@ -200,9 +187,7 @@
 }
 
 static __inline void
-ct_cmdp_write_1(chp, val)
-	struct ct_bus_access_handle *chp;
-	u_int8_t val;
+ct_cmdp_write_1(struct ct_bus_access_handle *chp, u_int8_t val)
 {
 
 	bus_space_write_1(chp->ch_iot, chp->ch_ioh, cmd_port, val);

Modified: trunk/sys/dev/snc/dp83932.c
===================================================================
--- trunk/sys/dev/snc/dp83932.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/snc/dp83932.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -142,10 +142,8 @@
 
 
 int
-sncconfig(sc, media, nmedia, defmedia, myea)
-	struct snc_softc *sc;
-	int *media, nmedia, defmedia;
-	u_int8_t *myea;
+sncconfig(struct snc_softc *sc, int *media, int nmedia, int defmedia,
+    u_int8_t *myea)
 {
 	struct ifnet *ifp;
 	int i;
@@ -196,8 +194,7 @@
 }
 
 void
-sncshutdown(arg)
-	void *arg;
+sncshutdown(void *arg)
 {
 	struct snc_softc *sc = arg;
 
@@ -209,8 +206,7 @@
  * Media change callback.
  */
 int
-snc_mediachange(ifp)
-	struct ifnet *ifp;
+snc_mediachange(struct ifnet *ifp)
 {
 	struct snc_softc *sc = ifp->if_softc;
 	int error;
@@ -228,9 +224,7 @@
  * Media status callback.
  */
 void
-snc_mediastatus(ifp, ifmr)
-	struct ifnet *ifp;
-	struct ifmediareq *ifmr;
+snc_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
 {
 	struct snc_softc *sc = ifp->if_softc;
 
@@ -249,10 +243,7 @@
 
 
 static int
-sncioctl(ifp, cmd, data)
-	struct ifnet *ifp;
-	u_long cmd;
-	caddr_t data;
+sncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
 	struct ifreq *ifr;
 	struct snc_softc *sc = ifp->if_softc;
@@ -318,8 +309,7 @@
  * Encapsulate a packet of type family for the local net.
  */
 static void
-sncstart(ifp)
-	struct ifnet *ifp;
+sncstart(struct ifnet *ifp)
 {
 	struct snc_softc	*sc = ifp->if_softc;
 
@@ -329,8 +319,7 @@
 }
 
 static void
-sncstart_locked(ifp)
-	struct ifnet *ifp;
+sncstart_locked(struct ifnet *ifp)
 {
 	struct snc_softc	*sc = ifp->if_softc;
 	struct mbuf	*m;
@@ -391,8 +380,7 @@
  * hardware/software errors.
  */
 static void
-sncreset(sc)
-	struct snc_softc *sc;
+sncreset(struct snc_softc *sc)
 {
 	sncstop(sc);
 	sncinit_locked(sc);
@@ -399,8 +387,7 @@
 }
 
 static void
-sncinit(xsc)
-	void *xsc;
+sncinit(void *xsc)
 {
 	struct snc_softc *sc = xsc;
 
@@ -477,8 +464,7 @@
  * part way through.
  */
 static int
-sncstop(sc)
-	struct snc_softc *sc;
+sncstop(struct snc_softc *sc)
 {
 	struct mtd *mtd;
 
@@ -537,10 +523,7 @@
  * stuff packet into sonic
  */
 static u_int
-sonicput(sc, m0, mtd_next)
-	struct snc_softc *sc;
-	struct mbuf *m0;
-	int mtd_next;
+sonicput(struct snc_softc *sc, struct mbuf *m0, int mtd_next)
 {
 	struct mtd *mtdp;
 	struct mbuf *m;
@@ -630,8 +613,7 @@
  * CAM support
  */
 static void
-caminitialise(sc)
-	struct snc_softc *sc;
+caminitialise(struct snc_softc *sc)
 {
 	u_int32_t v_cda = sc->v_cda;
 	int	i;
@@ -654,10 +636,7 @@
 }
 
 static void
-camentry(sc, entry, ea)
-	int entry;
-	u_char *ea;
-	struct snc_softc *sc;
+camentry(struct snc_softc *sc, int entry, u_char *ea)
 {
 	u_int32_t v_cda = sc->v_cda;
 	int	camoffset = entry * CDA_CAMDESC;
@@ -671,8 +650,7 @@
 }
 
 static void
-camprogram(sc)
-	struct snc_softc *sc;
+camprogram(struct snc_softc *sc)
 {
         struct ifmultiaddr      *ifma;
 	struct ifnet *ifp;
@@ -733,8 +711,7 @@
 
 #ifdef SNCDEBUG
 static void
-camdump(sc)
-	struct snc_softc *sc;
+camdump(struct snc_softc *sc)
 {
 	int	i;
 
@@ -759,8 +736,7 @@
 #endif
 
 static void
-initialise_tda(sc)
-	struct snc_softc *sc;
+initialise_tda(struct snc_softc *sc)
 {
 	struct mtd *mtd;
 	int	i;
@@ -781,8 +757,7 @@
 }
 
 static void
-initialise_rda(sc)
-	struct snc_softc *sc;
+initialise_rda(struct snc_softc *sc)
 {
 	int		i;
 	u_int32_t	vv_rda = 0;
@@ -810,8 +785,7 @@
 }
 
 static void
-initialise_rra(sc)
-	struct snc_softc *sc;
+initialise_rra(struct snc_softc *sc)
 {
 	int	i;
 	u_int	v;
@@ -843,8 +817,7 @@
 }
 
 void
-sncintr(arg)
-	void	*arg;
+sncintr(void *arg)
 {
 	struct snc_softc *sc = (struct snc_softc *)arg;
 	int	isr;
@@ -913,8 +886,7 @@
  * Transmit interrupt routine
  */
 static void
-sonictxint(sc)
-	struct snc_softc *sc;
+sonictxint(struct snc_softc *sc)
 {
 	struct mtd	*mtd;
 	u_int32_t	txp;
@@ -991,8 +963,7 @@
  * Receive interrupt routine
  */
 static void
-sonicrxint(sc)
-	struct snc_softc *sc;
+sonicrxint(struct snc_softc *sc)
 {
 	u_int32_t rda;
 	int	orra;
@@ -1085,10 +1056,7 @@
  * appropriate protocol handler
  */
 static int
-sonic_read(sc, pkt, len)
-	struct snc_softc *sc;
-	u_int32_t pkt;
-	int len;
+sonic_read(struct snc_softc *sc, u_int32_t pkt, int len)
 {
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ether_header *et;
@@ -1132,10 +1100,7 @@
  * munge the received packet into an mbuf chain
  */
 static struct mbuf *
-sonic_get(sc, pkt, datalen)
-	struct snc_softc *sc;
-	u_int32_t pkt;
-	int datalen;
+sonic_get(struct snc_softc *sc, u_int32_t pkt, int datalen)
 {
 	struct	mbuf *m, *top, **mp;
 	int	len;
@@ -1195,8 +1160,7 @@
  * Enable power on the interface.
  */
 int
-snc_enable(sc)
-	struct snc_softc *sc;
+snc_enable(struct snc_softc *sc)
 {
 
 #ifdef	SNCDEBUG
@@ -1218,8 +1182,7 @@
  * Disable power on the interface.
  */
 void
-snc_disable(sc)
-	struct snc_softc *sc;
+snc_disable(struct snc_softc *sc)
 {
 
 #ifdef	SNCDEBUG

Modified: trunk/sys/dev/snc/dp83932subr.c
===================================================================
--- trunk/sys/dev/snc/dp83932subr.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/snc/dp83932subr.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -73,9 +73,7 @@
  * to accept packets.
  */
 int
-sncsetup(sc, lladdr)
-	struct snc_softc	*sc;
-	u_int8_t *lladdr;
+sncsetup(struct snc_softc *sc, u_int8_t *lladdr)
 {
 	u_int32_t p, pp;
 	int	i;
@@ -172,8 +170,7 @@
  * check if a specified irq is acceptable.
  */
 u_int8_t
-snc_nec16_validate_irq(irq)
-	int irq;
+snc_nec16_validate_irq(int irq)
 {
 	const u_int8_t encoded_irq[16] = {
 	    -1, -1, -1, 0, -1, 1, 2, -1, -1, 3, 4, -1, 5, 6, -1, -1
@@ -186,9 +183,7 @@
  * specify irq to board.
  */
 int
-snc_nec16_register_irq(sc, irq)
-	struct snc_softc *sc;
-	int irq;
+snc_nec16_register_irq(struct snc_softc *sc, int irq)
 {
 	bus_space_tag_t iot = sc->sc_iot;
 	bus_space_handle_t ioh = sc->sc_ioh;
@@ -212,8 +207,7 @@
  * check if a specified memory base address is acceptable.
  */
 int
-snc_nec16_validate_mem(maddr)
-	int maddr;
+snc_nec16_validate_mem(int maddr)
 {
 
 	/* Check on Normal mode with max range, only */
@@ -230,9 +224,7 @@
  * specify memory base address to board and map to first bank.
  */
 int
-snc_nec16_register_mem(sc, maddr)
-	struct snc_softc *sc;
-	int maddr;
+snc_nec16_register_mem(struct snc_softc *sc, int maddr)
 {
 	bus_space_tag_t iot = sc->sc_iot;
 	bus_space_handle_t ioh = sc->sc_ioh;
@@ -260,11 +252,8 @@
 }
 
 int
-snc_nec16_check_memory(iot, ioh, memt, memh)
-	bus_space_tag_t iot;
-	bus_space_handle_t ioh;
-	bus_space_tag_t memt;
-	bus_space_handle_t memh;
+snc_nec16_check_memory(bus_space_tag_t iot, bus_space_handle_t ioh,
+    bus_space_tag_t memt, bus_space_handle_t memh)
 {
 	u_int16_t val;
 	int i, j;
@@ -341,14 +330,9 @@
 }
 
 int
-snc_nec16_detectsubr(iot, ioh, memt, memh, irq, maddr, type)
-	bus_space_tag_t iot;
-	bus_space_handle_t ioh;
-	bus_space_tag_t memt;
-	bus_space_handle_t memh;
-	int irq;
-	int maddr;
-	u_int8_t type;
+snc_nec16_detectsubr(bus_space_tag_t iot, bus_space_handle_t ioh,
+    bus_space_tag_t memt, bus_space_handle_t memh, int irq, int maddr,
+    u_int8_t type)
 {
 	u_int16_t cr;
 	u_int8_t ident;
@@ -413,8 +397,7 @@
 #define	SNC_NEC_SERIES_PNP_CBUS2	0x3d
 
 u_int8_t *
-snc_nec16_detect_type(myea)
-	u_int8_t *myea;
+snc_nec16_detect_type(u_int8_t *myea)
 {
 	u_int32_t vendor = (myea[0] << 16) | (myea[1] << 8) | myea[2];
 	u_int8_t series = myea[3];
@@ -459,10 +442,8 @@
 }
 
 int
-snc_nec16_get_enaddr(iot, ioh, myea)
-	bus_space_tag_t iot;
-	bus_space_handle_t ioh;
-	u_int8_t *myea;
+snc_nec16_get_enaddr(bus_space_tag_t iot, bus_space_handle_t ioh,
+    u_int8_t *myea)
 {
 	u_int8_t eeprom[SNEC_EEPROM_SIZE];
 	u_int8_t rom_sum, sum = 0x00;
@@ -493,9 +474,7 @@
  * read from NEC/SONIC NIC register.
  */
 u_int16_t
-snc_nec16_nic_get(sc, reg)
-	struct snc_softc *sc;
-	u_int8_t reg;
+snc_nec16_nic_get(struct snc_softc *sc, u_int8_t reg)
 {
 	u_int16_t val;
 
@@ -510,10 +489,7 @@
  * write to NEC/SONIC NIC register.
  */
 void
-snc_nec16_nic_put(sc, reg, val)
-	struct snc_softc *sc;
-	u_int8_t reg;
-	u_int16_t val;
+snc_nec16_nic_put(struct snc_softc *sc, u_int8_t reg, u_int16_t val)
 {
 
 	/* select SONIC register */
@@ -527,10 +503,7 @@
  * where exists specified (internal buffer memory) offset.
  */
 static __inline u_int16_t
-snc_nec16_select_bank(sc, base, offset)
-	struct snc_softc *sc;
-	u_int32_t base;
-	u_int32_t offset;
+snc_nec16_select_bank(struct snc_softc *sc, u_int32_t base, u_int32_t offset)
 {
 	bus_space_tag_t iot = sc->sc_iot;
 	bus_space_handle_t ioh = sc->sc_ioh;
@@ -565,11 +538,8 @@
  * write to SONIC descriptors.
  */
 void
-snc_nec16_writetodesc(sc, base, offset, val)
-	struct snc_softc *sc;
-	u_int32_t base;
-	u_int32_t offset;
-	u_int16_t val;
+snc_nec16_writetodesc(struct snc_softc *sc, u_int32_t base, u_int32_t offset,
+    u_int16_t val)
 {
 	bus_space_tag_t memt = sc->sc_memt;
 	bus_space_handle_t memh = sc->sc_memh;
@@ -584,10 +554,7 @@
  * read from SONIC descriptors.
  */
 u_int16_t
-snc_nec16_readfromdesc(sc, base, offset)
-	struct snc_softc *sc;
-	u_int32_t base;
-	u_int32_t offset;
+snc_nec16_readfromdesc(struct snc_softc *sc, u_int32_t base, u_int32_t offset)
 {
 	bus_space_tag_t memt = sc->sc_memt;
 	bus_space_handle_t memh = sc->sc_memh;
@@ -602,11 +569,8 @@
  * read from SONIC data buffer.
  */
 void
-snc_nec16_copyfrombuf(sc, dst, offset, size)
-	struct snc_softc *sc;
-	void *dst;
-	u_int32_t offset;
-	size_t size;
+snc_nec16_copyfrombuf(struct snc_softc *sc, void *dst, u_int32_t offset,
+    size_t size)
 {
 	bus_space_tag_t memt = sc->sc_memt;
 	bus_space_handle_t memh = sc->sc_memh;
@@ -644,11 +608,8 @@
  * write to SONIC data buffer.
  */
 void
-snc_nec16_copytobuf(sc, src, offset, size)
-	struct snc_softc *sc;
-	void *src;
-	u_int32_t offset;
-	size_t size;
+snc_nec16_copytobuf(struct snc_softc *sc, void *src, u_int32_t offset,
+    size_t size)
 {
 	bus_space_tag_t memt = sc->sc_memt;
 	bus_space_handle_t memh = sc->sc_memh;
@@ -688,10 +649,7 @@
  * write (fill) 0 to SONIC data buffer.
  */
 void
-snc_nec16_zerobuf(sc, offset, size)
-	struct snc_softc *sc;
-	u_int32_t offset;
-	size_t size;
+snc_nec16_zerobuf(struct snc_softc *sc, u_int32_t offset, size_t size)
 {
 	bus_space_tag_t memt = sc->sc_memt;
 	bus_space_handle_t memh = sc->sc_memh;
@@ -735,10 +693,8 @@
 #define	SNEC_EEP_DELAY	1000
 
 void
-snc_nec16_read_eeprom(iot, ioh, data)
-	bus_space_tag_t iot;
-	bus_space_handle_t ioh;
-	u_int8_t *data;
+snc_nec16_read_eeprom(bus_space_tag_t iot, bus_space_handle_t ioh,
+    u_int8_t *data)
 {
 	u_int8_t n, val, bit;
 
@@ -851,9 +807,7 @@
 
 #ifdef	SNCDEBUG
 void
-snc_nec16_dump_reg(iot, ioh)
-	bus_space_tag_t iot;
-	bus_space_handle_t ioh;
+snc_nec16_dump_reg(bus_space_tag_t iot, bus_space_handle_t ioh)
 {
 	u_int8_t n;
 	u_int16_t val;

Modified: trunk/sys/dev/snc/if_snc.c
===================================================================
--- trunk/sys/dev/snc/if_snc.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/snc/if_snc.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -66,9 +66,7 @@
  * Allocate a port resource with the given resource id.
  */
 int
-snc_alloc_port(dev, rid)
-	device_t dev;
-	int rid;
+snc_alloc_port(device_t dev, int rid)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	struct resource *res;
@@ -91,9 +89,7 @@
  * Allocate a memory resource with the given resource id.
  */
 int
-snc_alloc_memory(dev, rid)
-	device_t dev;
-	int rid;
+snc_alloc_memory(device_t dev, int rid)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	struct resource *res;
@@ -116,10 +112,7 @@
  * Allocate an irq resource with the given resource id.
  */
 int
-snc_alloc_irq(dev, rid, flags)
-	device_t dev;
-	int rid;
-	int flags;
+snc_alloc_irq(device_t dev, int rid, int flags)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	struct resource *res;
@@ -139,8 +132,7 @@
  * Release all resources
  */
 void
-snc_release_resources(dev)
-	device_t dev;
+snc_release_resources(device_t dev)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 
@@ -170,9 +162,7 @@
  ****************************************************************/
 
 int
-snc_probe(dev, type)
-     device_t dev;
-     int type;
+snc_probe(device_t dev, int type)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 
@@ -188,8 +178,7 @@
  ****************************************************************/
 
 int
-snc_attach(dev)
-	device_t dev;
+snc_attach(device_t dev)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	u_int8_t myea[ETHER_ADDR_LEN];
@@ -253,8 +242,7 @@
  ****************************************************************/
 
 int
-snc_shutdown(dev)
-	device_t dev;
+snc_shutdown(device_t dev)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 

Modified: trunk/sys/dev/snc/if_snc_cbus.c
===================================================================
--- trunk/sys/dev/snc/if_snc_cbus.c	2016-09-18 21:42:29 UTC (rev 8439)
+++ trunk/sys/dev/snc/if_snc_cbus.c	2016-09-18 21:46:34 UTC (rev 8440)
@@ -68,8 +68,7 @@
 };
 
 static void
-snc_isapnp_reconfig(dev)
-	device_t dev;
+snc_isapnp_reconfig(device_t dev)
 {
 	struct isa_device *idev = DEVTOISA(dev);
         struct isa_config config;
@@ -111,8 +110,7 @@
 }
 
 static int
-snc_isa_probe(dev)
-	device_t dev;
+snc_isa_probe(device_t dev)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	int type;
@@ -177,8 +175,7 @@
 }
 
 static int
-snc_isa_attach(dev)
-	device_t dev;
+snc_isa_attach(device_t dev)
 {
 	struct snc_softc *sc = device_get_softc(dev);
 	



More information about the Midnightbsd-cvs mailing list