From 06a6f48edf3c78a50a2b34d9da7d066e27884447 Mon Sep 17 00:00:00 2001 From: mpi Date: Mon, 21 Feb 2022 11:03:39 +0000 Subject: [PATCH] Constify struct cfattach. --- sys/arch/amd64/amd64/acpi_machdep.c | 4 ++-- sys/arch/amd64/amd64/bios.c | 4 ++-- sys/arch/amd64/amd64/cpu.c | 4 ++-- sys/arch/amd64/amd64/ioapic.c | 4 ++-- sys/arch/amd64/amd64/mainbus.c | 4 ++-- sys/arch/amd64/amd64/mpbios.c | 4 ++-- sys/arch/amd64/pci/aapic.c | 4 ++-- sys/arch/amd64/pci/acpipci.c | 4 ++-- sys/arch/amd64/pci/pchb.c | 4 ++-- sys/arch/amd64/pci/pcib.c | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c index 11690da24d2..373466415dd 100644 --- a/sys/arch/amd64/amd64/acpi_machdep.c +++ b/sys/arch/amd64/amd64/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.102 2022/02/17 17:22:22 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.103 2022/02/21 11:03:39 mpi Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -66,7 +66,7 @@ u_int8_t *acpi_scan(struct acpi_mem_map *, paddr_t, size_t); int acpi_match(struct device *, void *, void *); void acpi_attach(struct device *, struct device *, void *); -struct cfattach acpi_ca = { +const struct cfattach acpi_ca = { sizeof(struct acpi_softc), acpi_match, acpi_attach }; diff --git a/sys/arch/amd64/amd64/bios.c b/sys/arch/amd64/amd64/bios.c index 8dd34e4edf6..5061380f006 100644 --- a/sys/arch/amd64/amd64/bios.c +++ b/sys/arch/amd64/amd64/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.44 2021/03/11 11:16:54 jsg Exp $ */ +/* $OpenBSD: bios.c,v 1.45 2022/02/21 11:03:39 mpi Exp $ */ /* * Copyright (c) 2006 Gordon Willem Klok * @@ -44,7 +44,7 @@ void bios_attach(struct device *, struct device *, void *); int bios_print(void *, const char *); char *fixstring(char *); -struct cfattach bios_ca = { +const struct cfattach bios_ca = { sizeof(struct bios_softc), bios_match, bios_attach }; diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index cc189771bc7..30e734e407b 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.154 2021/08/31 17:40:59 dv Exp $ */ +/* $OpenBSD: cpu.c,v 1.155 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -375,7 +375,7 @@ struct cpu_functions mp_cpu_funcs = { mp_cpu_start, NULL, mp_cpu_start_cleanup }; #endif /* MULTIPROCESSOR */ -struct cfattach cpu_ca = { +const struct cfattach cpu_ca = { sizeof(struct cpu_softc), cpu_match, cpu_attach, NULL, cpu_activate }; diff --git a/sys/arch/amd64/amd64/ioapic.c b/sys/arch/amd64/amd64/ioapic.c index 0029edf0b56..f26e3676884 100644 --- a/sys/arch/amd64/amd64/ioapic.c +++ b/sys/arch/amd64/amd64/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.29 2018/08/25 16:09:29 kettenis Exp $ */ +/* $OpenBSD: ioapic.c,v 1.30 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: ioapic.c,v 1.6 2003/05/15 13:30:31 fvdl Exp $ */ /*- @@ -225,7 +225,7 @@ ioapic_print_redir(struct ioapic_softc *sc, char *why, int pin) apic_format_redir(sc->sc_pic.pic_name, why, pin, redirhi, redirlo); } -struct cfattach ioapic_ca = { +const struct cfattach ioapic_ca = { sizeof(struct ioapic_softc), ioapic_match, ioapic_attach, NULL, ioapic_activate }; diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c index b74c98781a8..ebc86e3767b 100644 --- a/sys/arch/amd64/amd64/mainbus.c +++ b/sys/arch/amd64/amd64/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.51 2021/08/31 15:52:59 patrick Exp $ */ +/* $OpenBSD: mainbus.c,v 1.52 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: mainbus.c,v 1.1 2003/04/26 18:39:29 fvdl Exp $ */ /* @@ -78,7 +78,7 @@ void replacemds(void); int mainbus_match(struct device *, void *, void *); void mainbus_attach(struct device *, struct device *, void *); -struct cfattach mainbus_ca = { +const struct cfattach mainbus_ca = { sizeof(struct device), mainbus_match, mainbus_attach }; diff --git a/sys/arch/amd64/amd64/mpbios.c b/sys/arch/amd64/amd64/mpbios.c index 6735cd9521e..4ecb318461e 100644 --- a/sys/arch/amd64/amd64/mpbios.c +++ b/sys/arch/amd64/amd64/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.30 2020/12/20 09:49:53 jmatthew Exp $ */ +/* $OpenBSD: mpbios.c,v 1.31 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: mpbios.c,v 1.7 2003/05/15 16:32:50 fvdl Exp $ */ /*- @@ -184,7 +184,7 @@ int mpbios_scanned; int mpbios_match(struct device *, void *, void *); void mpbios_attach(struct device *, struct device *, void *); -struct cfattach mpbios_ca = { +const struct cfattach mpbios_ca = { sizeof(struct device), mpbios_match, mpbios_attach }; diff --git a/sys/arch/amd64/pci/aapic.c b/sys/arch/amd64/pci/aapic.c index 6862f3a66b6..f65105b3692 100644 --- a/sys/arch/amd64/pci/aapic.c +++ b/sys/arch/amd64/pci/aapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aapic.c,v 1.6 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: aapic.c,v 1.7 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: aapic.c,v 1.3 2005/01/13 23:40:01 fvdl Exp $ */ /* @@ -31,7 +31,7 @@ struct aapic_softc { struct device sc_dev; }; -struct cfattach aapic_ca = { +const struct cfattach aapic_ca = { sizeof(struct aapic_softc), aapic_match, aapic_attach }; diff --git a/sys/arch/amd64/pci/acpipci.c b/sys/arch/amd64/pci/acpipci.c index 660ee86f7fc..2600846cb5f 100644 --- a/sys/arch/amd64/pci/acpipci.c +++ b/sys/arch/amd64/pci/acpipci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipci.c,v 1.6 2021/03/11 11:16:55 jsg Exp $ */ +/* $OpenBSD: acpipci.c,v 1.7 2022/02/21 11:03:39 mpi Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -71,7 +71,7 @@ struct acpipci_softc { int acpipci_match(struct device *, void *, void *); void acpipci_attach(struct device *, struct device *, void *); -struct cfattach acpipci_ca = { +const struct cfattach acpipci_ca = { sizeof(struct acpipci_softc), acpipci_match, acpipci_attach }; diff --git a/sys/arch/amd64/pci/pchb.c b/sys/arch/amd64/pci/pchb.c index a257ca4d66b..9b10011e2db 100644 --- a/sys/arch/amd64/pci/pchb.c +++ b/sys/arch/amd64/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.45 2020/05/29 04:42:23 deraadt Exp $ */ +/* $OpenBSD: pchb.c,v 1.46 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: pchb.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */ /* * Copyright (c) 2000 Michael Shalayeff @@ -116,7 +116,7 @@ int pchbmatch(struct device *, void *, void *); void pchbattach(struct device *, struct device *, void *); int pchbactivate(struct device *, int); -struct cfattach pchb_ca = { +const struct cfattach pchb_ca = { sizeof(struct pchb_softc), pchbmatch, pchbattach, NULL, pchbactivate }; diff --git a/sys/arch/amd64/pci/pcib.c b/sys/arch/amd64/pci/pcib.c index 556ba549c71..b945044e857 100644 --- a/sys/arch/amd64/pci/pcib.c +++ b/sys/arch/amd64/pci/pcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcib.c,v 1.6 2013/05/30 16:15:01 deraadt Exp $ */ +/* $OpenBSD: pcib.c,v 1.7 2022/02/21 11:03:39 mpi Exp $ */ /* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /*- @@ -49,7 +49,7 @@ void pcibattach(struct device *, struct device *, void *); void pcib_callback(struct device *); int pcib_print(void *, const char *); -struct cfattach pcib_ca = { +const struct cfattach pcib_ca = { sizeof(struct device), pcibmatch, pcibattach }; -- 2.20.1