Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys kill some more simple submatch() functions, use config_s...
details: https://anonhg.NetBSD.org/src/rev/7c8c49ece47f
branches: trunk
changeset: 583857:7c8c49ece47f
user: drochner <drochner%NetBSD.org@localhost>
date: Fri Aug 26 10:13:05 2005 +0000
description:
kill some more simple submatch() functions, use config_stdsubmatch()
diffstat:
sys/arch/alpha/jensenio/jensenio.c | 20 +++-----------------
sys/arch/alpha/mcbus/mcbus.c | 28 ++++++----------------------
sys/arch/alpha/sableio/sableio.c | 20 +++-----------------
sys/arch/alpha/tlsb/gbus.c | 23 +++--------------------
sys/arch/alpha/tlsb/tlsb.c | 28 ++++------------------------
sys/dev/tc/ioasic_subr.c | 20 +++-----------------
sys/dev/tc/tc.c | 28 ++++------------------------
sys/dev/tc/tcds.c | 23 +++--------------------
8 files changed, 29 insertions(+), 161 deletions(-)
diffs (truncated from 486 to 300 lines):
diff -r 74b1ea9c59f7 -r 7c8c49ece47f sys/arch/alpha/jensenio/jensenio.c
--- a/sys/arch/alpha/jensenio/jensenio.c Fri Aug 26 03:19:14 2005 +0000
+++ b/sys/arch/alpha/jensenio/jensenio.c Fri Aug 26 10:13:05 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jensenio.c,v 1.11 2005/08/25 18:35:38 drochner Exp $ */
+/* $NetBSD: jensenio.c,v 1.12 2005/08/26 10:13:05 drochner Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.11 2005/08/25 18:35:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.12 2005/08/26 10:13:05 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,8 +93,6 @@
jensenio_match, jensenio_attach, NULL, NULL);
int jensenio_print(void *, const char *);
-int jensenio_submatch(struct device *, struct cfdata *,
- const locdesc_t *, void *);
int jensenio_attached;
@@ -194,7 +192,7 @@
locs[JENSENIOCF_PORT] = jensenio_devs[i].jd_ioaddr;
(void) config_found_sm_loc(self, "jensenio", locs, &ja,
- jensenio_print, jensenio_submatch);
+ jensenio_print, config_stdsubmatch);
}
/*
@@ -222,18 +220,6 @@
}
int
-jensenio_submatch(struct device *parent, struct cfdata *cf,
- const locdesc_t *locs, void *aux)
-{
-
- if (cf->cf_loc[JENSENIOCF_PORT] != JENSENIOCF_PORT_DEFAULT &&
- cf->cf_loc[JENSENIOCF_PORT] != locs[JENSENIOCF_PORT])
- return (0);
-
- return (config_match(parent, cf, aux));
-}
-
-int
jensenio_print(void *aux, const char *pnp)
{
struct jensenio_attach_args *ja = aux;
diff -r 74b1ea9c59f7 -r 7c8c49ece47f sys/arch/alpha/mcbus/mcbus.c
--- a/sys/arch/alpha/mcbus/mcbus.c Fri Aug 26 03:19:14 2005 +0000
+++ b/sys/arch/alpha/mcbus/mcbus.c Fri Aug 26 10:13:05 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcbus.c,v 1.16 2005/08/25 18:35:38 drochner Exp $ */
+/* $NetBSD: mcbus.c,v 1.17 2005/08/26 10:13:05 drochner Exp $ */
/*
* Copyright (c) 1998 by Matthew Jacob
@@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.16 2005/08/25 18:35:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.17 2005/08/26 10:13:05 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -66,8 +66,6 @@
static int mcbusmatch __P((struct device *, struct cfdata *, void *));
static void mcbusattach __P((struct device *, struct device *, void *));
static int mcbusprint __P((void *, const char *));
-static int mcbussbm __P((struct device *, struct cfdata *,
- const locdesc_t *, void *));
static const char *mcbus_node_type_str __P((u_int8_t));
typedef struct {
@@ -103,21 +101,6 @@
}
static int
-mcbussbm(parent, cf, locs, aux)
- struct device *parent;
- struct cfdata *cf;
- const locdesc_t *locs;
- void *aux;
-{
-
- if (cf->cf_loc[MCBUSCF_MID] != MCBUSCF_MID_DEFAULT &&
- cf->cf_loc[MCBUSCF_MID] != locs[MCBUSCF_MID])
- return (0);
-
- return (config_match(parent, cf, aux));
-}
-
-static int
mcbusmatch(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
@@ -173,7 +156,7 @@
mbp->mcbus_types[1] = MCBUS_TYPE_MEM;
locs[MCBUSCF_MID] = 1;
(void) config_found_sm_loc(self, "mcbus", locs, &ta,
- mcbusprint, mcbussbm);
+ mcbusprint, config_stdsubmatch);
/*
* Now find PCI busses.
@@ -191,7 +174,8 @@
locs[MCBUSCF_MID] = mid;
if (MCPCIA_EXISTS(ta.ma_mid, ta.ma_gid))
(void) config_found_sm_loc(self, "mcbus", locs, &ta,
- mcbusprint, mcbussbm);
+ mcbusprint,
+ config_stdsubmatch);
}
#if 0
@@ -219,7 +203,7 @@
mbp->mcbus_types[mid] = MCBUS_TYPE_CPU;
locs[MCBUSCF_MID] = mid;
(void) config_found_sm_loc(self, "mcbus", locs, &ta,
- mcbusprint, mcbussbm);
+ mcbusprint, config_stdsubmatch);
}
#endif
diff -r 74b1ea9c59f7 -r 7c8c49ece47f sys/arch/alpha/sableio/sableio.c
--- a/sys/arch/alpha/sableio/sableio.c Fri Aug 26 03:19:14 2005 +0000
+++ b/sys/arch/alpha/sableio/sableio.c Fri Aug 26 10:13:05 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sableio.c,v 1.9 2005/08/25 18:35:38 drochner Exp $ */
+/* $NetBSD: sableio.c,v 1.10 2005/08/26 10:13:05 drochner Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.9 2005/08/25 18:35:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.10 2005/08/26 10:13:05 drochner Exp $");
#include "isadma.h"
@@ -111,8 +111,6 @@
sableio_match, sableio_attach, NULL, NULL);
int sableio_print(void *, const char *);
-int sableio_submatch(struct device *, struct cfdata *,
- const locdesc_t *, void *);
struct sableio_softc *sableio_attached;
@@ -178,23 +176,11 @@
locs[SABLEIOCF_PORT] = sableio_devs[i].sd_ioaddr;
(void) config_found_sm_loc(self, "sableio", locs, &sa,
- sableio_print, sableio_submatch);
+ sableio_print, config_stdsubmatch);
}
}
int
-sableio_submatch(struct device *parent, struct cfdata *cf,
- const locdesc_t *locs, void *aux)
-{
-
- if (cf->cf_loc[SABLEIOCF_PORT] != SABLEIOCF_PORT_DEFAULT &&
- cf->cf_loc[SABLEIOCF_PORT] != locs[SABLEIOCF_PORT])
- return (0);
-
- return (config_match(parent, cf, aux));
-}
-
-int
sableio_print(void *aux, const char *pnp)
{
struct sableio_attach_args *sa = aux;
diff -r 74b1ea9c59f7 -r 7c8c49ece47f sys/arch/alpha/tlsb/gbus.c
--- a/sys/arch/alpha/tlsb/gbus.c Fri Aug 26 03:19:14 2005 +0000
+++ b/sys/arch/alpha/tlsb/gbus.c Fri Aug 26 10:13:05 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gbus.c,v 1.16 2005/08/25 18:35:38 drochner Exp $ */
+/* $NetBSD: gbus.c,v 1.17 2005/08/26 10:13:05 drochner Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: gbus.c,v 1.16 2005/08/25 18:35:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gbus.c,v 1.17 2005/08/26 10:13:05 drochner Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -68,8 +68,6 @@
gbusmatch, gbusattach, NULL, NULL);
static int gbusprint __P((void *, const char *));
-static int gbussubmatch __P((struct device *, struct cfdata *,
- const locdesc_t *, void *));
struct gbus_attach_args gbus_children[] = {
{ "zsc", GBUS_DUART0_OFFSET },
@@ -133,21 +131,6 @@
for (ga = gbus_children; ga->ga_name != NULL; ga++) {
locs[GBUSCF_OFFSET] = ga->ga_offset;
(void) config_found_sm_loc(self, "gbus", locs, ga,
- gbusprint, gbussubmatch);
+ gbusprint, config_stdsubmatch);
}
}
-
-static int
-gbussubmatch(parent, cf, locs, aux)
- struct device *parent;
- struct cfdata *cf;
- const locdesc_t *locs;
- void *aux;
-{
-
- if (cf->cf_loc[GBUSCF_OFFSET] != GBUSCF_OFFSET_DEFAULT &&
- cf->cf_loc[GBUSCF_OFFSET] != locs[GBUSCF_OFFSET])
- return (0);
-
- return (config_match(parent, cf, aux));
-}
diff -r 74b1ea9c59f7 -r 7c8c49ece47f sys/arch/alpha/tlsb/tlsb.c
--- a/sys/arch/alpha/tlsb/tlsb.c Fri Aug 26 03:19:14 2005 +0000
+++ b/sys/arch/alpha/tlsb/tlsb.c Fri Aug 26 10:13:05 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlsb.c,v 1.29 2005/08/25 18:35:38 drochner Exp $ */
+/* $NetBSD: tlsb.c,v 1.30 2005/08/26 10:13:05 drochner Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
* NASA AMES Research Center.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.29 2005/08/25 18:35:38 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tlsb.c,v 1.30 2005/08/26 10:13:05 drochner Exp $");
#include "opt_multiprocessor.h"
@@ -71,8 +71,6 @@
extern struct cfdriver tlsb_cd;
static int tlsbprint __P((void *, const char *));
-static int tlsbsubmatch __P((struct device *, struct cfdata *,
- const locdesc_t *, void *));
static const char *tlsb_node_type_str __P((u_int32_t));
/*
@@ -104,24 +102,6 @@
}
static int
-tlsbsubmatch(parent, cf, locs, aux)
- struct device *parent;
- struct cfdata *cf;
- const locdesc_t *locs;
- void *aux;
-{
-
- if (cf->cf_loc[TLSBCF_NODE] != TLSBCF_NODE_DEFAULT &&
- cf->cf_loc[TLSBCF_NODE] != locs[TLSBCF_NODE])
- return (0);
- if (cf->cf_loc[TLSBCF_OFFSET] != TLSBCF_OFFSET_DEFAULT &&
- cf->cf_loc[TLSBCF_OFFSET] != locs[TLSBCF_OFFSET])
- return (0);
-
- return (config_match(parent, cf, aux));
-}
-
-static int
tlsbmatch(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
@@ -209,7 +189,7 @@
locs[TLSBCF_OFFSET] = 0; /* XXX unused? */
config_found_sm_loc(self, "tlsb", locs, &ta,
- tlsbprint, tlsbsubmatch);
+ tlsbprint, config_stdsubmatch);
}
/*
* *Now* search for I/O nodes (in descending order)
@@ -255,7 +235,7 @@
locs[TLSBCF_OFFSET] = 0; /* XXX unused? */
config_found_sm_loc(self, "tlsb", locs, &ta,
- tlsbprint, tlsbsubmatch);
Home |
Main Index |
Thread Index |
Old Index