Source-Changes-HG archive

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

[src/thorpej-cfargs]: src/sys/arch/x86/pci These devices have only one interf...



details:   https://anonhg.NetBSD.org/src/rev/c465b26ec5b8
branches:  thorpej-cfargs
changeset: 960467:c465b26ec5b8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Mar 28 01:03:19 2021 +0000

description:
These devices have only one interface attribute and no locators,
so simplify:

- config_attach_loc() -> config_attach().
- Don't pass CFARG_IATTR, or CFARG_LOCATORS to config_search().

diffstat:

 sys/arch/x86/pci/amdnb_misc.c |  8 +++-----
 sys/arch/x86/pci/amdsmn.c     |  9 +++------
 2 files changed, 6 insertions(+), 11 deletions(-)

diffs (80 lines):

diff -r 2400d37e6440 -r c465b26ec5b8 sys/arch/x86/pci/amdnb_misc.c
--- a/sys/arch/x86/pci/amdnb_misc.c     Sun Mar 28 01:01:45 2021 +0000
+++ b/sys/arch/x86/pci/amdnb_misc.c     Sun Mar 28 01:03:19 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $ */
+/*     $NetBSD: amdnb_misc.c,v 1.3.14.4 2021/03/28 01:03:19 thorpej Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.3 2021/03/21 19:06:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdnb_misc.c,v 1.3.14.4 2021/03/28 01:03:19 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -114,7 +114,7 @@
        if (!attach)
                return 0;
 
-       config_attach_loc(parent, cf, locs, aux, NULL);
+       config_attach(parent, cf, aux, NULL);
 
        return 0;
 }
@@ -160,8 +160,6 @@
 
        config_search(self, &sc->sc_pa,
            CFARG_SUBMATCH, amdnb_misc_search,
-           CFARG_IATTR, ifattr,
-           CFARG_LOCATORS, locators,
            CFARG_EOL);
 
        return 0;
diff -r 2400d37e6440 -r c465b26ec5b8 sys/arch/x86/pci/amdsmn.c
--- a/sys/arch/x86/pci/amdsmn.c Sun Mar 28 01:01:45 2021 +0000
+++ b/sys/arch/x86/pci/amdsmn.c Sun Mar 28 01:03:19 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdsmn.c,v 1.10.4.2 2021/03/21 19:06:19 thorpej Exp $  */
+/*     $NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 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.2 2021/03/21 19:06:19 thorpej Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.10.4.3 2021/03/28 01:03:19 thorpej Exp $ ");
 
 /*
  * Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -133,7 +133,6 @@
 {
        struct amdsmn_softc *sc = device_private(self);
        struct pci_attach_args *pa = aux;
-       int flags = 0;
        size_t i;
 
        mutex_init(&sc->smn_lock, MUTEX_DEFAULT, IPL_NONE);
@@ -149,7 +148,7 @@
 
        // aprint_normal(": AMD Family 17h System Management Network\n");
        aprint_normal(": AMD System Management Network\n");
-       amdsmn_rescan(self, "amdsmnbus", &flags);
+       amdsmn_rescan(self, NULL, NULL);
 }
 
 static int
@@ -159,8 +158,6 @@
 
        config_search(self, &sc->pa,
            CFARG_SUBMATCH, amdsmn_misc_search,
-           CFARG_IATTR, ifattr,
-           CFARG_LOCATORS, locators,
            CFARG_EOL);
 
        return 0;



Home | Main Index | Thread Index | Old Index