Module Name: src Committed By: thorpej Date: Sun Mar 28 01:03:19 UTC 2021
Modified Files: src/sys/arch/x86/pci [thorpej-cfargs]: amdnb_misc.c amdsmn.c Log Message: 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(). To generate a diff of this commit: cvs rdiff -u -r1.3.14.3 -r1.3.14.4 src/sys/arch/x86/pci/amdnb_misc.c cvs rdiff -u -r1.10.4.2 -r1.10.4.3 src/sys/arch/x86/pci/amdsmn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/pci/amdnb_misc.c diff -u src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.3 src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.4 --- src/sys/arch/x86/pci/amdnb_misc.c:1.3.14.3 Sun Mar 21 19:06:19 2021 +++ src/sys/arch/x86/pci/amdnb_misc.c Sun Mar 28 01:03:19 2021 @@ -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 @@ amdnb_misc_search(device_t parent, cfdat if (!attach) return 0; - config_attach_loc(parent, cf, locs, aux, NULL); + config_attach(parent, cf, aux, NULL); return 0; } @@ -160,8 +160,6 @@ amdnb_misc_rescan(device_t self, const c config_search(self, &sc->sc_pa, CFARG_SUBMATCH, amdnb_misc_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0; Index: src/sys/arch/x86/pci/amdsmn.c diff -u src/sys/arch/x86/pci/amdsmn.c:1.10.4.2 src/sys/arch/x86/pci/amdsmn.c:1.10.4.3 --- src/sys/arch/x86/pci/amdsmn.c:1.10.4.2 Sun Mar 21 19:06:19 2021 +++ src/sys/arch/x86/pci/amdsmn.c Sun Mar 28 01:03:19 2021 @@ -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 <c...@freebsd.org> @@ -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 @@ amdsmn_attach(device_t parent, device_t { 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 @@ amdsmn_attach(device_t parent, device_t // 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 @@ amdsmn_rescan(device_t self, const char config_search(self, &sc->pa, CFARG_SUBMATCH, amdsmn_misc_search, - CFARG_IATTR, ifattr, - CFARG_LOCATORS, locators, CFARG_EOL); return 0;