Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/sys config_attach_loc() -> config_attach() with...



details:   https://anonhg.NetBSD.org/src/rev/a4cfe3ee13bb
branches:  thorpej-cfargs
changeset: 960489:a4cfe3ee13bb
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Apr 03 06:54:28 2021 +0000

description:
config_attach_loc() -> config_attach() with CFARG_LOCATORS argument.

diffstat:

 sys/arch/powerpc/booke/dev/pq3obio.c |   8 +++++---
 sys/arch/x86/pci/amdpcib.c           |   8 +++++---
 sys/arch/x86/pci/amdsmn.c            |   8 +++++---
 sys/dev/audio/audio.c                |   8 +++++---
 sys/dev/fdt/fdtbus.c                 |  10 ++++++----
 sys/dev/gpio/gpio.c                  |  10 ++++++----
 sys/dev/ic/apple_smc.c               |   8 +++++---
 sys/dev/isa/isa.c                    |   8 +++++---
 sys/dev/isa/pcppi.c                  |   8 +++++---
 sys/dev/scsipi/scsiconf.c            |   9 +++++----
 sys/kern/subr_autoconf.c             |  16 ++++------------
 sys/sys/device.h                     |   3 +--
 12 files changed, 57 insertions(+), 47 deletions(-)

diffs (truncated from 356 to 300 lines):

diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/arch/powerpc/booke/dev/pq3obio.c
--- a/sys/arch/powerpc/booke/dev/pq3obio.c      Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/arch/powerpc/booke/dev/pq3obio.c      Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $  */
+/*     $NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $  */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -37,7 +37,7 @@
 #define        LBC_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.2 2021/03/21 17:35:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pq3obio.c,v 1.5.4.3 2021/04/03 06:54:28 thorpej Exp $");
 
 #include "locators.h"
 
@@ -151,7 +151,9 @@
                            [OBIOCF_IRQ] = ga.ga_irq,
                            [OBIOCF_CS] = ga.ga_cs,
                        };
-                       config_attach_loc(parent, cf, floc, &ga, pq3obio_print);
+                       config_attach(parent, cf, &ga, pq3obio_print,
+                           CFARG_LOCATORS, floc,
+                           CFARG_EOL);
                        tryagain = (cf->cf_fstate == FSTATE_STAR);
                }
        } while (tryagain);
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/arch/x86/pci/amdpcib.c
--- a/sys/arch/x86/pci/amdpcib.c        Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/arch/x86/pci/amdpcib.c        Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $ */
+/* $NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $ */
 
 /*
  * Copyright (c) 2006 Nicolas Joly
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.1 2021/03/20 19:33:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdpcib.c,v 1.3.96.2 2021/04/03 06:54:28 thorpej Exp $");
 
 #include <sys/systm.h>
 #include <sys/device.h>
@@ -83,7 +83,9 @@
 {
 
        if (config_match(parent, cf, aux))
-               config_attach_loc(parent, cf, locs, aux, NULL);
+               config_attach(parent, cf, aux, NULL,
+                   CFARG_LOCATORS, locs,
+                   CFARG_EOL);
 
        return 0;
 }
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/arch/x86/pci/amdsmn.c
--- a/sys/arch/x86/pci/amdsmn.c Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/arch/x86/pci/amdsmn.c Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $  */
+/*     $NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $  */
 
 /*-
  * Copyright (c) 2017, 2019 Conrad Meyer <cem%FreeBSD.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.4 2021/04/03 06:54:28 thorpej Exp $ ");
 
 /*
  * Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -123,7 +123,9 @@
 amdsmn_misc_search(device_t parent, cfdata_t cf, const int *locs, void *aux)
 {
        if (config_match(parent, cf, aux))
-               config_attach_loc(parent, cf, locs, aux, NULL);
+               config_attach(parent, cf, aux, NULL,
+                   CFARG_LOCATORS, locs,
+                   CFARG_EOL);
 
        return 0;
 }
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/audio/audio.c
--- a/sys/dev/audio/audio.c     Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/audio/audio.c     Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $   */
+/*     $NetBSD: audio.c,v 1.91.2.5 2021/04/03 06:54:28 thorpej Exp $   */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.4 2021/03/28 19:55:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.91.2.5 2021/04/03 06:54:28 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1404,7 +1404,9 @@
 {
 
        if (config_match(parent, cf, aux))
-               config_attach_loc(parent, cf, locs, aux, NULL);
+               config_attach(parent, cf, aux, NULL,
+                   CFARG_LOCATORS,
+                   CFARG_EOL);
 
        return 0;
 }
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/fdt/fdtbus.c
--- a/sys/dev/fdt/fdtbus.c      Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/fdt/fdtbus.c      Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdtbus.c,v 1.40.2.2 2021/03/22 02:00:59 thorpej Exp $ */
+/* $NetBSD: fdtbus.c,v 1.40.2.3 2021/04/03 06:54:29 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.40.2.2 2021/03/22 02:00:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.40.2.3 2021/04/03 06:54:29 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -393,8 +393,10 @@
                fdt_pre_attach(node);
 
                if (quiet) {
-                       node->n_dev = config_attach_loc(node->n_bus, node->n_cf, locs,
-                           &faa, fdtbus_print);
+                       node->n_dev = config_attach(node->n_bus, node->n_cf,
+                           &faa, fdtbus_print,
+                           CFARG_LOCATORS, locs,
+                           CFARG_EOL);
                } else {
                        /*
                         * Default pass.
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/gpio/gpio.c
--- a/sys/dev/gpio/gpio.c       Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/gpio/gpio.c       Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.64.10.6 2021/04/03 01:57:17 thorpej Exp $ */
+/* $NetBSD: gpio.c,v 1.64.10.7 2021/04/03 06:54:29 thorpej Exp $ */
 /*     $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.6 2021/04/03 01:57:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.64.10.7 2021/04/03 06:54:29 thorpej Exp $");
 
 /*
  * General Purpose Input/Output framework.
@@ -857,8 +857,10 @@
                    CFARG_LOCATORS, locs,
                    CFARG_EOL);
                if (cf != NULL) {
-                       dv = config_attach_loc(sc->sc_dev, cf, locs, &ga,
-                           gpiobus_print);
+                       dv = config_attach(sc->sc_dev, cf, &ga,
+                           gpiobus_print,
+                           CFARG_LOCATORS, locs,
+                           CFARG_EOL);
 #ifdef COMPAT_50
                        if (dv != NULL) {
                                gdev = kmem_alloc(sizeof(struct gpio_dev),
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/ic/apple_smc.c
--- a/sys/dev/ic/apple_smc.c    Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/ic/apple_smc.c    Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $       */
+/*     $NetBSD: apple_smc.c,v 1.6.50.3 2021/04/03 06:54:29 thorpej Exp $       */
 
 /*
  * Apple System Management Controller
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.2 2021/03/28 20:25:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_smc.c,v 1.6.50.3 2021/04/03 06:54:29 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -150,7 +150,9 @@
 
        /* Looks hunky-dory.  Attach.  */
        asa.asa_smc = smc;
-       (void)config_attach_loc(parent, cf, locators, &asa, NULL);
+       config_attach(parent, cf, &asa, NULL,
+           CFARG_LOCATORS, locators,
+           CFARG_EOL);
        return 0;
 }
 
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/isa/isa.c
--- a/sys/dev/isa/isa.c Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/isa/isa.c Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $   */
+/*     $NetBSD: isa.c,v 1.138.76.5 2021/04/03 06:54:29 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 2001, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.4 2021/03/28 20:34:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa.c,v 1.138.76.5 2021/04/03 06:54:29 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -484,7 +484,9 @@
                        flocs[ISACF_IRQ] = ia.ia_irq[0].ir_irq;
                        flocs[ISACF_DRQ] = ia.ia_drq[0].ir_drq;
                        flocs[ISACF_DRQ2] = ia.ia_drq[1].ir_drq;
-                       config_attach_loc(parent, cf, flocs, &ia, isaprint);
+                       config_attach(parent, cf, &ia, isaprint,
+                           CFARG_LOCATORS, flocs,
+                           CFARG_EOL);
                        tryagain = (cf->cf_fstate == FSTATE_STAR);
                }
        } while (tryagain);
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/isa/pcppi.c
--- a/sys/dev/isa/pcppi.c       Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/isa/pcppi.c       Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $ */
+/* $NetBSD: pcppi.c,v 1.45.22.4 2021/04/03 06:54:29 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.3 2021/03/28 20:35:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcppi.c,v 1.45.22.4 2021/04/03 06:54:29 thorpej Exp $");
 
 #include "attimer.h"
 
@@ -257,7 +257,9 @@
 {
 
        if (config_match(parent, cf, aux))
-               config_attach_loc(parent, cf, locs, aux, NULL);
+               config_attach(parent, cf, aux, NULL,
+                   CFARG_LOCATORS, locs,
+                   CFARG_EOL);
 
        return 0;
 }
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $       */
+/*     $NetBSD: scsiconf.c,v 1.290.4.4 2021/04/03 06:54:29 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.3 2021/03/28 20:38:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.290.4.4 2021/04/03 06:54:29 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1033,8 +1033,9 @@
                 * XXX need it before config_attach() returns.  Must
                 * XXX assign it in periph driver.
                 */
-               config_attach_loc(sc->sc_dev, cf, locs, &sa,
-                                        scsibusprint);
+               config_attach(sc->sc_dev, cf, &sa, scsibusprint,
+                   CFARG_LOCATORS, locs,
+                   CFARG_EOL);
        } else {
                scsibusprint(&sa, device_xname(sc->sc_dev));
                aprint_normal(" not configured\n");
diff -r fe5706f3dd16 -r a4cfe3ee13bb sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Sat Apr 03 01:57:08 2021 +0000
+++ b/sys/kern/subr_autoconf.c  Sat Apr 03 06:54:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.277.2.7 2021/04/03 01:57:18 thorpej Exp $ */



Home | Main Index | Thread Index | Old Index