From: kettenis Date: Tue, 21 Dec 2021 20:53:46 +0000 (+0000) Subject: Move checks on attach arguments from attach into match. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=57ec09467b7f455f3147a55672af90d023f0a861;p=openbsd Move checks on attach arguments from attach into match. ok anton@, deraadt@ --- diff --git a/sys/dev/acpi/ahci_acpi.c b/sys/dev/acpi/ahci_acpi.c index 294214207b9..b754b4a8fb1 100644 --- a/sys/dev/acpi/ahci_acpi.c +++ b/sys/dev/acpi/ahci_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */ +/* $OpenBSD: ahci_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -48,6 +48,8 @@ ahci_acpi_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aaa = aux; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchcls(aaa, PCI_CLASS_MASS_STORAGE, PCI_SUBCLASS_MASS_STORAGE_SATA, PCI_INTERFACE_SATA_AHCI10); } @@ -62,16 +64,6 @@ ahci_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); printf(" irq %d", aaa->aaa_irq[0]); diff --git a/sys/dev/acpi/amdgpio.c b/sys/dev/acpi/amdgpio.c index ddbd5daa916..685ed1b6a82 100644 --- a/sys/dev/acpi/amdgpio.c +++ b/sys/dev/acpi/amdgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdgpio.c,v 1.5 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: amdgpio.c,v 1.6 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * Copyright (c) 2019 James Hastings @@ -93,6 +93,8 @@ amdgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, amdgpio_hids, cf->cf_driver->cd_name); } @@ -107,16 +109,6 @@ amdgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) { printf(": can't find uid\n"); return; diff --git a/sys/dev/acpi/aplgpio.c b/sys/dev/acpi/aplgpio.c index 53cad22d564..c70556849c3 100644 --- a/sys/dev/acpi/aplgpio.c +++ b/sys/dev/acpi/aplgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aplgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: aplgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * Copyright (c) 2019 James Hastings @@ -84,6 +84,8 @@ aplgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, aplgpio_hids, cf->cf_driver->cd_name); } @@ -99,16 +101,6 @@ aplgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) { printf(": can't find uid\n"); return; diff --git a/sys/dev/acpi/asmc.c b/sys/dev/acpi/asmc.c index cb9556f456c..c100ee2150a 100644 --- a/sys/dev/acpi/asmc.c +++ b/sys/dev/acpi/asmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asmc.c,v 1.3 2020/12/12 09:44:27 mglocker Exp $ */ +/* $OpenBSD: asmc.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2015 Joerg Jung * @@ -242,6 +242,8 @@ asmc_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aa = aux; struct cfdata *cf = match; + if (aa->aaa_naddr < 1) + return 0; return acpi_matchhids(aa, asmc_hids, cf->cf_driver->cd_name); } @@ -280,11 +282,6 @@ asmc_attach(struct device *parent, struct device *self, void *aux) if (!(aml_evalname(sc->sc_acpi, sc->sc_devnode, "_CID", 0, NULL, &res))) printf(" (%s)", res.v_string); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - printf (" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); sc->sc_iot = aaa->aaa_bst[0]; diff --git a/sys/dev/acpi/bytgpio.c b/sys/dev/acpi/bytgpio.c index 031d7d5af42..6be9cdfaa69 100644 --- a/sys/dev/acpi/bytgpio.c +++ b/sys/dev/acpi/bytgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bytgpio.c,v 1.15 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: bytgpio.c,v 1.16 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -110,6 +110,8 @@ bytgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, bytgpio_hids, cf->cf_driver->cd_name); } @@ -126,16 +128,6 @@ bytgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) { printf(": can't find uid\n"); return; diff --git a/sys/dev/acpi/ccp_acpi.c b/sys/dev/acpi/ccp_acpi.c index e720cd87697..26eeca4ede1 100644 --- a/sys/dev/acpi/ccp_acpi.c +++ b/sys/dev/acpi/ccp_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccp_acpi.c,v 1.2 2020/05/08 11:18:01 kettenis Exp $ */ +/* $OpenBSD: ccp_acpi.c,v 1.3 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2019 Mark Kettenis * @@ -50,6 +50,8 @@ ccp_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1) + return 0; return acpi_matchhids(aaa, ccp_hids, cf->cf_driver->cd_name); } @@ -63,11 +65,6 @@ ccp_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); sc->sc.sc_iot = aaa->aaa_bst[0]; diff --git a/sys/dev/acpi/chvgpio.c b/sys/dev/acpi/chvgpio.c index f2c3c0c9132..af5aab91615 100644 --- a/sys/dev/acpi/chvgpio.c +++ b/sys/dev/acpi/chvgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chvgpio.c,v 1.10 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: chvgpio.c,v 1.11 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -155,6 +155,8 @@ chvgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, chvgpio_hids, cf->cf_driver->cd_name); } @@ -170,16 +172,6 @@ chvgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) { printf(": can't find uid\n"); return; diff --git a/sys/dev/acpi/dwgpio.c b/sys/dev/acpi/dwgpio.c index 776b92e2854..f216fcfbe4f 100644 --- a/sys/dev/acpi/dwgpio.c +++ b/sys/dev/acpi/dwgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: dwgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -100,6 +100,8 @@ dwgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, dwgpio_hids, cf->cf_driver->cd_name); } @@ -114,16 +116,6 @@ dwgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); sc->sc_memt = aaa->aaa_bst[0]; diff --git a/sys/dev/acpi/dwiic_acpi.c b/sys/dev/acpi/dwiic_acpi.c index 528f1734f0e..7f0abc1b5ea 100644 --- a/sys/dev/acpi/dwiic_acpi.c +++ b/sys/dev/acpi/dwiic_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dwiic_acpi.c,v 1.17 2021/12/07 10:16:50 kettenis Exp $ */ +/* $OpenBSD: dwiic_acpi.c,v 1.18 2021/12/21 20:53:46 kettenis Exp $ */ /* * Synopsys DesignWare I2C controller * @@ -91,6 +91,8 @@ dwiic_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1) + return 0; return acpi_matchhids(aaa, dwiic_hids, cf->cf_driver->cd_name); } @@ -108,11 +110,6 @@ dwiic_acpi_attach(struct device *parent, struct device *self, void *aux) printf(" %s", sc->sc_devnode->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - if (aml_evalname(sc->sc_acpi, sc->sc_devnode, "_CRS", 0, NULL, &res)) { printf(", no _CRS method\n"); return; diff --git a/sys/dev/acpi/glkgpio.c b/sys/dev/acpi/glkgpio.c index 5351e66c355..fdfd78acb9a 100644 --- a/sys/dev/acpi/glkgpio.c +++ b/sys/dev/acpi/glkgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glkgpio.c,v 1.3 2021/05/16 08:50:59 jsg Exp $ */ +/* $OpenBSD: glkgpio.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * Copyright (c) 2019 James Hastings @@ -85,6 +85,8 @@ glkgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, glkgpio_hids, cf->cf_driver->cd_name); } @@ -100,16 +102,6 @@ glkgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalinteger(sc->sc_acpi, sc->sc_node, "_UID", 0, NULL, &uid)) { printf(": can't find uid\n"); return; diff --git a/sys/dev/acpi/if_bse_acpi.c b/sys/dev/acpi/if_bse_acpi.c index b5b95370b64..a76dcb9360e 100644 --- a/sys/dev/acpi/if_bse_acpi.c +++ b/sys/dev/acpi/if_bse_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bse_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */ +/* $OpenBSD: if_bse_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -60,6 +60,8 @@ bse_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, bse_hids, cf->cf_driver->cd_name); } @@ -75,16 +77,6 @@ bse_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); printf(" irq %d", aaa->aaa_irq[0]); diff --git a/sys/dev/acpi/imxiic_acpi.c b/sys/dev/acpi/imxiic_acpi.c index 6c043a15989..70a63af6dc7 100644 --- a/sys/dev/acpi/imxiic_acpi.c +++ b/sys/dev/acpi/imxiic_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxiic_acpi.c,v 1.2 2021/07/24 10:52:07 patrick Exp $ */ +/* $OpenBSD: imxiic_acpi.c,v 1.3 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2015, 2016 joshua stein * Copyright (c) 2020 Patrick Wildt @@ -67,6 +67,8 @@ imxiic_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1) + return 0; return acpi_matchhids(aaa, imxiic_hids, cf->cf_driver->cd_name); } @@ -83,11 +85,6 @@ imxiic_acpi_attach(struct device *parent, struct device *self, void *aux) printf(" %s", ac->ac_devnode->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); sc->sc_iot = aaa->aaa_bst[0]; diff --git a/sys/dev/acpi/pchgpio.c b/sys/dev/acpi/pchgpio.c index 276066c3de9..e5b388e68aa 100644 --- a/sys/dev/acpi/pchgpio.c +++ b/sys/dev/acpi/pchgpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchgpio.c,v 1.9 2021/12/07 18:06:08 kettenis Exp $ */ +/* $OpenBSD: pchgpio.c,v 1.10 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * Copyright (c) 2020 James Hastings @@ -261,6 +261,8 @@ pchgpio_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, pchgpio_hids, cf->cf_driver->cd_name); } @@ -276,16 +278,6 @@ pchgpio_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr"); for (i = 0; i < aaa->aaa_naddr; i++) { diff --git a/sys/dev/acpi/pluart_acpi.c b/sys/dev/acpi/pluart_acpi.c index 4c531187407..dc8ea5e9922 100644 --- a/sys/dev/acpi/pluart_acpi.c +++ b/sys/dev/acpi/pluart_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pluart_acpi.c,v 1.4 2020/05/08 11:18:01 kettenis Exp $ */ +/* $OpenBSD: pluart_acpi.c,v 1.5 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -58,6 +58,8 @@ pluart_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, pluart_hids, cf->cf_driver->cd_name); } @@ -71,16 +73,6 @@ pluart_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); printf(" irq %d", aaa->aaa_irq[0]); diff --git a/sys/dev/acpi/sdhc_acpi.c b/sys/dev/acpi/sdhc_acpi.c index 113ff84ca01..0e3a633fa2b 100644 --- a/sys/dev/acpi/sdhc_acpi.c +++ b/sys/dev/acpi/sdhc_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc_acpi.c,v 1.18 2021/03/08 13:48:56 kettenis Exp $ */ +/* $OpenBSD: sdhc_acpi.c,v 1.19 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -77,6 +77,8 @@ sdhc_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, sdhc_hids, cf->cf_driver->cd_name); } @@ -92,16 +94,6 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - if (aml_evalname(sc->sc_acpi, sc->sc_node, "_CRS", 0, NULL, &res)) { printf(": can't find registers\n"); return; diff --git a/sys/dev/acpi/tpm.c b/sys/dev/acpi/tpm.c index d3f3861e46e..627cc0bfe25 100644 --- a/sys/dev/acpi/tpm.c +++ b/sys/dev/acpi/tpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tpm.c,v 1.14 2021/12/07 16:07:56 deraadt Exp $ */ +/* $OpenBSD: tpm.c,v 1.15 2021/12/21 20:53:46 kettenis Exp $ */ /* * Minimal interface to Trusted Platform Module chips implementing the @@ -254,6 +254,8 @@ tpm_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aa = aux; struct cfdata *cf = match; + if (aa->aaa_naddr < 1) + return 0; return (acpi_matchhids(aa, tpm_hids, cf->cf_driver->cd_name)); } @@ -300,11 +302,6 @@ tpm_attach(struct device *parent, struct device *self, void *aux) return; } - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); sc->sc_bbase = aaa->aaa_addr[0]; diff --git a/sys/dev/acpi/xhci_acpi.c b/sys/dev/acpi/xhci_acpi.c index 95e69cee896..aea9b1f18e7 100644 --- a/sys/dev/acpi/xhci_acpi.c +++ b/sys/dev/acpi/xhci_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_acpi.c,v 1.3 2020/05/08 11:18:01 kettenis Exp $ */ +/* $OpenBSD: xhci_acpi.c,v 1.4 2021/12/21 20:53:46 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -61,6 +61,8 @@ xhci_acpi_match(struct device *parent, void *match, void *aux) struct acpi_attach_args *aaa = aux; struct cfdata *cf = match; + if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1) + return 0; return acpi_matchhids(aaa, xhci_hids, cf->cf_driver->cd_name); } @@ -75,16 +77,6 @@ xhci_acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_node = aaa->aaa_node; printf(" %s", sc->sc_node->name); - if (aaa->aaa_naddr < 1) { - printf(": no registers\n"); - return; - } - - if (aaa->aaa_nirq < 1) { - printf(": no interrupt\n"); - return; - } - printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); printf(" irq %d", aaa->aaa_irq[0]);