Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/thorpej-cfargs2]: src/sys/arch Adapt to CFARGS().
details: https://anonhg.NetBSD.org/src/rev/5f4c68e63b0b
branches: thorpej-cfargs2
changeset: 1022678:5f4c68e63b0b
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Aug 03 23:41:24 2021 +0000
description:
Adapt to CFARGS().
diffstat:
sys/arch/arc/arc/mainbus.c | 8 +++---
sys/arch/arc/dti/btl.c | 6 ++--
sys/arch/arc/isa/isabus.c | 7 ++---
sys/arch/arc/jazz/fd.c | 6 ++--
sys/arch/arc/jazz/jazzio.c | 6 ++--
sys/arch/arc/pci/necpb.c | 6 ++--
sys/arch/atari/atari/autoconf.c | 50 +++++++++++++++++----------------------
sys/arch/atari/atari/device.h | 5 ++-
sys/arch/atari/dev/fd.c | 6 ++--
sys/arch/atari/dev/grf.c | 8 +++---
sys/arch/atari/dev/hdfd.c | 6 ++--
sys/arch/atari/dev/ite_cc.c | 10 ++++----
sys/arch/atari/dev/ite_et.c | 10 ++++----
sys/arch/atari/dev/kbd.c | 6 ++--
sys/arch/atari/dev/ncr5380.c | 6 ++--
sys/arch/atari/isa/isa_machdep.c | 6 ++--
sys/arch/atari/pci/pci_machdep.c | 6 ++--
sys/arch/atari/vme/vme.c | 9 +++----
sys/arch/atari/vme/vme_machdep.c | 6 ++--
sys/arch/bebox/bebox/mainbus.c | 13 ++++------
20 files changed, 88 insertions(+), 98 deletions(-)
diffs (truncated from 686 to 300 lines):
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/arc/mainbus.c
--- a/sys/arch/arc/arc/mainbus.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/arc/mainbus.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.24 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: mainbus.c,v 1.24.8.1 2021/08/03 23:41:24 thorpej Exp $ */
/* $OpenBSD: mainbus.c,v 1.4 1998/10/15 21:30:15 imp Exp $ */
/* NetBSD: mainbus.c,v 1.3 1995/06/28 02:45:10 cgd Exp */
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.24 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.24.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -78,13 +78,13 @@
nca.ca_name = "cpu";
nca.ca_slot = 0;
nca.ca_offset = 0;
- config_found(self, &nca, mbprint, CFARG_EOL);
+ config_found(self, &nca, mbprint, CFARGS_NONE);
for (i = 0; platform->mainbusdevs[i] != NULL; i++) {
nca.ca_name = platform->mainbusdevs[i];
nca.ca_slot = 0;
nca.ca_offset = 0;
- config_found(self, &nca, mbprint, CFARG_EOL);
+ config_found(self, &nca, mbprint, CFARGS_NONE);
}
}
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/dti/btl.c
--- a/sys/arch/arc/dti/btl.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/dti/btl.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btl.c,v 1.29 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: btl.c,v 1.29.8.1 2021/08/03 23:41:24 thorpej Exp $ */
/* NetBSD: bt.c,v 1.10 1996/05/12 23:51:54 mycroft Exp */
#undef BTDIAG
@@ -51,7 +51,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btl.c,v 1.29 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btl.c,v 1.29.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -411,7 +411,7 @@
/*
* ask the adapter what subunits are present
*/
- config_found(self, &sc->sc_link, scsiprint, CFARG_EOL);
+ config_found(self, &sc->sc_link, scsiprint, CFARGS_NONE);
}
integrate void
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/isa/isabus.c
--- a/sys/arch/arc/isa/isabus.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/isa/isabus.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isabus.c,v 1.52 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: isabus.c,v 1.52.8.1 2021/08/03 23:41:24 thorpej Exp $ */
/* $OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $ */
/* NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp */
@@ -120,7 +120,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.52 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isabus.c,v 1.52.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -208,8 +208,7 @@
iba.iba_dmat = &sc->sc_dmat;
iba.iba_ic = &sc->arc_isa_cs;
config_found(sc->sc_dev, &iba, isabrprint,
- CFARG_IATTR, "isabus",
- CFARG_EOL);
+ CFARGS(.iattr = "isabus"));
}
static int
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/jazz/fd.c
--- a/sys/arch/arc/jazz/fd.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/jazz/fd.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.50 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: fd.c,v 1.50.8.1 2021/08/03 23:41:24 thorpej 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.50 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.50.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -282,7 +282,7 @@
for (fa.fa_drive = 0; fa.fa_drive < 2; fa.fa_drive++) {
fa.fa_deftype = &fd_types[type];
(void)config_found(fdc->sc_dev, (void *)&fa, fdprint,
- CFARG_EOL);
+ CFARGS_NONE);
}
}
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/jazz/jazzio.c
--- a/sys/arch/arc/jazz/jazzio.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/jazz/jazzio.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jazzio.c,v 1.23 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: jazzio.c,v 1.23.8.1 2021/08/03 23:41:24 thorpej Exp $ */
/* $OpenBSD: picabus.c,v 1.11 1999/01/11 05:11:10 millert Exp $ */
/* NetBSD: tc.c,v 1.2 1995/03/08 00:39:05 cgd Exp */
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: jazzio.c,v 1.23 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jazzio.c,v 1.23.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -149,7 +149,7 @@
ja.ja_dma = 0;
/* Tell the autoconfig machinery we've found the hardware. */
- config_found(self, &ja, jazzioprint, CFARG_EOL);
+ config_found(self, &ja, jazzioprint, CFARGS_NONE);
}
}
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/arc/pci/necpb.c
--- a/sys/arch/arc/pci/necpb.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/arc/pci/necpb.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: necpb.c,v 1.47 2021/04/24 23:36:25 thorpej Exp $ */
+/* $NetBSD: necpb.c,v 1.47.8.1 2021/08/03 23:41:24 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.47 2021/04/24 23:36:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: necpb.c,v 1.47.8.1 2021/08/03 23:41:24 thorpej Exp $");
#include "opt_pci.h"
@@ -276,7 +276,7 @@
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
- config_found(self, &pba, pcibusprint, CFARG_EOL);
+ config_found(self, &pba, pcibusprint, CFARGS_NONE);
}
static void
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/atari/atari/autoconf.c
--- a/sys/arch/atari/atari/autoconf.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/atari/atari/autoconf.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.70 2021/04/27 14:48:29 thorpej Exp $ */
+/* $NetBSD: autoconf.c,v 1.70.6.1 2021/08/03 23:43:44 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -30,10 +30,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define __SUBR_AUTOCONF_PRIVATE /* XXX atari_config_found() */
-
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.70 2021/04/27 14:48:29 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.70.6.1 2021/08/03 23:43:44 thorpej Exp $");
#include "opt_md.h"
@@ -141,18 +139,15 @@
*/
int
atari_config_found(cfdata_t pcfp, device_t parent, void *aux, cfprint_t pfn,
- cfarg_t tag, ...)
+ const struct cfargs *cfargs)
{
struct device temp;
cfdata_t cf;
const struct cfattach *ca;
int rv = 0;
- va_list ap;
-
- va_start(ap, tag);
if (atari_realconfig) {
- rv = config_vfound(parent, aux, pfn, tag, ap) != NULL;
+ rv = config_found(parent, aux, pfn, cfargs) != NULL;
goto out;
}
@@ -164,7 +159,7 @@
parent->dv_cfdriver = config_cfdriver_lookup(pcfp->cf_name);
parent->dv_unit = pcfp->cf_unit;
- if ((cf = config_vsearch(parent, aux, tag, ap)) != NULL) {
+ if ((cf = config_search(parent, aux, cfargs)) != NULL) {
ca = config_cfattach_lookup(cf->cf_name, cf->cf_atname);
if (ca != NULL) {
(*ca->ca_attach)(parent, NULL, aux);
@@ -174,7 +169,6 @@
}
parent->dv_cfdata = NULL;
out:
- va_end(ap);
return rv;
}
@@ -203,9 +197,9 @@
* some setup for the 'grf-side'. This make it possible to use
* a PCI card for both wscons and grfabs.
*/
- atari_config_found(cf, NULL, __UNCONST("pcib") , NULL, CFARG_EOL);
- atari_config_found(cf, NULL, __UNCONST("isab") , NULL, CFARG_EOL);
- atari_config_found(cf, NULL, __UNCONST("grfbus"), NULL, CFARG_EOL);
+ atari_config_found(cf, NULL, __UNCONST("pcib") , NULL, CFARGS_NONE);
+ atari_config_found(cf, NULL, __UNCONST("isab") , NULL, CFARGS_NONE);
+ atari_config_found(cf, NULL, __UNCONST("grfbus"), NULL, CFARGS_NONE);
}
/*
@@ -325,20 +319,20 @@
mb_attached = 1;
printf ("\n");
- config_found(self, __UNCONST("clock") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("grfbus") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("kbd") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("fdc") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("ser") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("zs") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("ncrscsi") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("nvr") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("lpt") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("wdc") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("ne") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("isab") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("pcib") , simple_devprint, CFARG_EOL);
- config_found(self, __UNCONST("avmebus") , simple_devprint, CFARG_EOL);
+ config_found(self, __UNCONST("clock") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("grfbus") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("kbd") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("fdc") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("ser") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("zs") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("ncrscsi") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("nvr") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("lpt") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("wdc") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("ne") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("isab") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("pcib") , simple_devprint, CFARGS_NONE);
+ config_found(self, __UNCONST("avmebus") , simple_devprint, CFARGS_NONE);
}
#if 0
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/atari/atari/device.h
--- a/sys/arch/atari/atari/device.h Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/atari/atari/device.h Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.7 2021/04/27 14:48:29 thorpej Exp $ */
+/* $NetBSD: device.h,v 1.7.6.1 2021/08/03 23:43:44 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@@ -39,7 +39,8 @@
* *and know it* (i.e. everything is really tight certain params won't be
* passed in some cases and the devices will deal with it)
*/
-int atari_config_found(cfdata_t, device_t, void *, cfprint_t, cfarg_t, ...);
+int atari_config_found(cfdata_t, device_t, void *, cfprint_t,
+ const struct cfargs *);
int simple_devprint(void *, const char *);
int matchname(char *, char *);
/*
diff -r 6302400f35e2 -r 5f4c68e63b0b sys/arch/atari/dev/fd.c
--- a/sys/arch/atari/dev/fd.c Tue Aug 03 23:19:52 2021 +0000
+++ b/sys/arch/atari/dev/fd.c Tue Aug 03 23:41:24 2021 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index