Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi acpi(9): No need to test dv_locators.



details:   https://anonhg.NetBSD.org/src/rev/a70c1f9bc44a
branches:  trunk
changeset: 361130:a70c1f9bc44a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 11 23:19:59 2022 +0000

description:
acpi(9): No need to test dv_locators.

It is always initialized by config_devalloc before config_devlink
makes it visible to device iteration.  No need to reach into private
autoconf internals.

diffstat:

 sys/dev/acpi/acpi_pci.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r f9338a321c03 -r a70c1f9bc44a sys/dev/acpi/acpi_pci.c
--- a/sys/dev/acpi/acpi_pci.c   Fri Feb 11 23:19:43 2022 +0000
+++ b/sys/dev/acpi/acpi_pci.c   Fri Feb 11 23:19:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_pci.c,v 1.34 2022/01/22 11:49:17 thorpej Exp $ */
+/* $NetBSD: acpi_pci.c,v 1.35 2022/02/11 23:19:59 riastradh Exp $ */
 
 /*
  * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.34 2022/01/22 11:49:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.35 2022/02/11 23:19:59 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -472,9 +472,6 @@
                if (pr == NULL || device_is_a(pr, "pci") != true)
                        continue;
 
-               if (dv->dv_locators == NULL)    /* This should not happen. */
-                       continue;
-
                pci = device_private(pr);
 
                if (pci->sc_bus == ap->ap_bus &&



Home | Main Index | Thread Index | Old Index