From: mpi Date: Mon, 21 Feb 2022 10:24:28 +0000 (+0000) Subject: Constify struct cfattach. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7769e6a4215edf69788d9f8061ce3c2819510c7b;p=openbsd Constify struct cfattach. --- diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index e51cd184c25..5f83b03de50 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.84 2022/02/17 17:22:24 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.85 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -71,7 +71,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/i386/i386/amdmsr.c b/sys/arch/i386/i386/amdmsr.c index c096ceb5d38..8d01a7974f8 100644 --- a/sys/arch/i386/i386/amdmsr.c +++ b/sys/arch/i386/i386/amdmsr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdmsr.c,v 1.10 2018/02/19 08:59:52 mpi Exp $ */ +/* $OpenBSD: amdmsr.c,v 1.11 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2008 Marc Balmer @@ -57,7 +57,7 @@ struct cfdriver amdmsr_cd = { int amdmsr_match(struct device *, void *, void *); void amdmsr_attach(struct device *, struct device *, void *); -struct cfattach amdmsr_ca = { +const struct cfattach amdmsr_ca = { sizeof(struct amdmsr_softc), amdmsr_match, amdmsr_attach }; diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index fc9a75edf77..a62bcf15e8c 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.126 2020/12/25 12:59:51 visa Exp $ */ +/* $OpenBSD: apm.c,v 1.127 2022/02/21 10:24:28 mpi Exp $ */ /*- * Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved. @@ -95,7 +95,7 @@ struct apm_softc { int apmprobe(struct device *, void *, void *); void apmattach(struct device *, struct device *, void *); -struct cfattach apm_ca = { +const struct cfattach apm_ca = { sizeof(struct apm_softc), apmprobe, apmattach }; diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c index f55aad04eed..b0c8ea6bb5a 100644 --- a/sys/arch/i386/i386/bios.c +++ b/sys/arch/i386/i386/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.126 2020/08/26 03:29:05 visa Exp $ */ +/* $OpenBSD: bios.c,v 1.127 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 1997-2001 Michael Shalayeff @@ -90,7 +90,7 @@ void biosattach(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), biosprobe, biosattach, NULL, config_activate_children }; diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index b01dc88c1e3..772dafae5dc 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.107 2021/03/11 11:16:57 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.108 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -179,7 +179,7 @@ struct cpu_softc { struct cpu_info *sc_info; }; -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/i386/i386/esm.c b/sys/arch/i386/i386/esm.c index 1ec3231d648..0a734dc971d 100644 --- a/sys/arch/i386/i386/esm.c +++ b/sys/arch/i386/i386/esm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esm.c,v 1.61 2019/10/12 15:56:17 cheloha Exp $ */ +/* $OpenBSD: esm.c,v 1.62 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave @@ -124,7 +124,7 @@ struct esm_softc { volatile int sc_wdog_tickle; }; -struct cfattach esm_ca = { +const struct cfattach esm_ca = { sizeof(struct esm_softc), esm_match, esm_attach, NULL, esm_activate }; diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c index 66e6438ceda..012f578cd7f 100644 --- a/sys/arch/i386/i386/ioapic.c +++ b/sys/arch/i386/i386/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.42 2021/09/02 08:48:22 mpi Exp $ */ +/* $OpenBSD: ioapic.c,v 1.43 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */ /*- @@ -236,7 +236,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/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c index 6b0b62a3131..85e6254a68a 100644 --- a/sys/arch/i386/i386/mainbus.c +++ b/sys/arch/i386/i386/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.59 2019/01/18 01:34:50 pd Exp $ */ +/* $OpenBSD: mainbus.c,v 1.60 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: mainbus.c,v 1.21 1997/06/06 23:14:20 thorpej Exp $ */ /* @@ -84,7 +84,7 @@ 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, NULL, config_activate_children }; diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c index 9a27fc5a42e..6bdcd2b9bee 100644 --- a/sys/arch/i386/i386/mpbios.c +++ b/sys/arch/i386/i386/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.43 2021/03/11 11:16:57 jsg Exp $ */ +/* $OpenBSD: mpbios.c,v 1.44 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */ /*- @@ -197,7 +197,7 @@ int mp_verbose = 0; 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/i386/isa/ahc_isa.c b/sys/arch/i386/isa/ahc_isa.c index b19e8155537..cbc9aa26930 100644 --- a/sys/arch/i386/isa/ahc_isa.c +++ b/sys/arch/i386/isa/ahc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_isa.c,v 1.19 2021/03/11 11:16:57 jsg Exp $ */ +/* $OpenBSD: ahc_isa.c,v 1.20 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: ahc_isa.c,v 1.5 1996/10/21 22:27:39 thorpej Exp $ */ /* @@ -120,7 +120,7 @@ int ahc_isa_probe(struct device *, void *, void *); void ahc_isa_attach(struct device *, struct device *, void *); void aha2840_load_seeprom(struct ahc_softc *ahc); -struct cfattach ahc_isa_ca = { +const struct cfattach ahc_isa_ca = { sizeof(struct ahc_softc), ahc_isa_probe, ahc_isa_attach }; diff --git a/sys/arch/i386/isa/joy_isa.c b/sys/arch/i386/isa/joy_isa.c index 9b8d8df5fd1..ba08d6236d8 100644 --- a/sys/arch/i386/isa/joy_isa.c +++ b/sys/arch/i386/isa/joy_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: joy_isa.c,v 1.7 2007/08/01 13:18:18 martin Exp $ */ +/* $OpenBSD: joy_isa.c,v 1.8 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: joy.c,v 1.3 1996/05/05 19:46:15 christos Exp $ */ /*- @@ -52,7 +52,7 @@ int joy_isa_probe(struct device *, void *, void *); void joy_isa_attach(struct device *, struct device *, void *); -struct cfattach joy_isa_ca = { +const struct cfattach joy_isa_ca = { sizeof(struct joy_softc), joy_isa_probe, joy_isa_attach }; diff --git a/sys/arch/i386/isa/joy_isapnp.c b/sys/arch/i386/isa/joy_isapnp.c index 05882575ee0..d75c7ed30a5 100644 --- a/sys/arch/i386/isa/joy_isapnp.c +++ b/sys/arch/i386/isa/joy_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: joy_isapnp.c,v 1.7 2007/08/01 13:18:18 martin Exp $ */ +/* $OpenBSD: joy_isapnp.c,v 1.8 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: joy.c,v 1.3 1996/05/05 19:46:15 christos Exp $ */ /*- @@ -52,7 +52,7 @@ int joy_isapnp_probe(struct device *, void *, void *); void joy_isapnp_attach(struct device *, struct device *, void *); -struct cfattach joy_isapnp_ca = { +const struct cfattach joy_isapnp_ca = { sizeof(struct joy_softc), joy_isapnp_probe, joy_isapnp_attach }; diff --git a/sys/arch/i386/isa/lms.c b/sys/arch/i386/isa/lms.c index 964e045f1bc..79159b04f5a 100644 --- a/sys/arch/i386/isa/lms.c +++ b/sys/arch/i386/isa/lms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lms.c,v 1.21 2016/06/05 20:02:36 bru Exp $ */ +/* $OpenBSD: lms.c,v 1.22 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: lms.c,v 1.38 2000/01/08 02:57:25 takemura Exp $ */ /*- @@ -61,7 +61,7 @@ int lmsprobe(struct device *, void *, void *); void lmsattach(struct device *, struct device *, void *); int lmsintr(void *); -struct cfattach lms_ca = { +const struct cfattach lms_ca = { sizeof(struct lms_softc), lmsprobe, lmsattach }; diff --git a/sys/arch/i386/isa/mms.c b/sys/arch/i386/isa/mms.c index 513b097287c..c41d6b2bc8a 100644 --- a/sys/arch/i386/isa/mms.c +++ b/sys/arch/i386/isa/mms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mms.c,v 1.20 2016/06/05 20:02:36 bru Exp $ */ +/* $OpenBSD: mms.c,v 1.21 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: mms.c,v 1.35 2000/01/08 02:57:25 takemura Exp $ */ /*- @@ -58,7 +58,7 @@ int mmsprobe(struct device *, void *, void *); void mmsattach(struct device *, struct device *, void *); int mmsintr(void *); -struct cfattach mms_ca = { +const struct cfattach mms_ca = { sizeof(struct mms_softc), mmsprobe, mmsattach }; diff --git a/sys/arch/i386/isa/npx.c b/sys/arch/i386/isa/npx.c index ccb07b2f770..b318d3a74f0 100644 --- a/sys/arch/i386/isa/npx.c +++ b/sys/arch/i386/isa/npx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npx.c,v 1.72 2020/09/24 21:14:32 deraadt Exp $ */ +/* $OpenBSD: npx.c,v 1.73 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: npx.c,v 1.57 1996/05/12 23:12:24 mycroft Exp $ */ #if 0 @@ -114,7 +114,7 @@ struct npx_softc { int npxprobe(struct device *, void *, void *); void npxattach(struct device *, struct device *, void *); -struct cfattach npx_ca = { +const struct cfattach npx_ca = { sizeof(struct npx_softc), npxprobe, npxattach }; diff --git a/sys/arch/i386/pci/elan520.c b/sys/arch/i386/pci/elan520.c index d93a2c9615a..6a9d629e613 100644 --- a/sys/arch/i386/pci/elan520.c +++ b/sys/arch/i386/pci/elan520.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elan520.c,v 1.22 2018/07/30 14:19:12 kettenis Exp $ */ +/* $OpenBSD: elan520.c,v 1.23 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: elan520.c,v 1.4 2002/10/02 05:47:15 thorpej Exp $ */ /*- @@ -86,7 +86,7 @@ void elansc_gpio_pin_ctl(void *, int, int); u_int elansc_tc_read(struct timecounter *); -struct cfattach elansc_ca = { +const struct cfattach elansc_ca = { sizeof(struct elansc_softc), elansc_match, elansc_attach, NULL, elansc_activate }; diff --git a/sys/arch/i386/pci/geodesc.c b/sys/arch/i386/pci/geodesc.c index 960a9d4beb7..9be655d22ca 100644 --- a/sys/arch/i386/pci/geodesc.c +++ b/sys/arch/i386/pci/geodesc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: geodesc.c,v 1.16 2021/02/23 04:44:30 cheloha Exp $ */ +/* $OpenBSD: geodesc.c,v 1.17 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2003 Markus Friedl @@ -48,7 +48,7 @@ void sc1100_sysreset(void); int geodesc_wdogctl_cb(void *, int); #endif /* SMALL_KERNEL */ -struct cfattach geodesc_ca = { +const struct cfattach geodesc_ca = { sizeof(struct geodesc_softc), geodesc_match, geodesc_attach, NULL, geodesc_activate }; diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c index 8d9245e86d9..119159dc2bf 100644 --- a/sys/arch/i386/pci/glxsb.c +++ b/sys/arch/i386/pci/glxsb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glxsb.c,v 1.40 2021/10/24 10:26:22 patrick Exp $ */ +/* $OpenBSD: glxsb.c,v 1.41 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2006 Tom Cosgrove @@ -176,7 +176,7 @@ void glxsb_attach(struct device *, struct device *, void *); int glxsb_activate(struct device *, int); void glxsb_rnd(void *); -struct cfattach glxsb_ca = { +const struct cfattach glxsb_ca = { sizeof(struct glxsb_softc), glxsb_match, glxsb_attach, NULL, glxsb_activate }; diff --git a/sys/arch/i386/pci/gscpcib.c b/sys/arch/i386/pci/gscpcib.c index 80eadb2f260..1aa2c53085d 100644 --- a/sys/arch/i386/pci/gscpcib.c +++ b/sys/arch/i386/pci/gscpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscpcib.c,v 1.6 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: gscpcib.c,v 1.7 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -57,7 +57,7 @@ void gscpcib_gpio_pin_ctl(void *, int, int); /* arch/i386/pci/pcib.c */ void pcibattach(struct device *, struct device *, void *); -struct cfattach gscpcib_ca = { +const struct cfattach gscpcib_ca = { sizeof (struct gscpcib_softc), gscpcib_match, gscpcib_attach diff --git a/sys/arch/i386/pci/gscpm.c b/sys/arch/i386/pci/gscpm.c index ac7fc5675c5..c91aa0f4c3e 100644 --- a/sys/arch/i386/pci/gscpm.c +++ b/sys/arch/i386/pci/gscpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscpm.c,v 1.12 2021/03/11 11:16:57 jsg Exp $ */ +/* $OpenBSD: gscpm.c,v 1.13 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -60,7 +60,7 @@ struct timecounter gscpm_timecounter = { .tc_user = 0, }; -struct cfattach gscpm_ca = { +const struct cfattach gscpm_ca = { sizeof (struct gscpm_softc), gscpm_match, gscpm_attach diff --git a/sys/arch/i386/pci/ichpcib.c b/sys/arch/i386/pci/ichpcib.c index 479fc423744..0bf1c04b27d 100644 --- a/sys/arch/i386/pci/ichpcib.c +++ b/sys/arch/i386/pci/ichpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichpcib.c,v 1.30 2021/02/23 04:44:30 cheloha Exp $ */ +/* $OpenBSD: ichpcib.c,v 1.31 2022/02/21 10:24:28 mpi Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -68,7 +68,7 @@ struct timecounter ichpcib_timecounter = { .tc_user = 0, }; -struct cfattach ichpcib_ca = { +const struct cfattach ichpcib_ca = { sizeof(struct ichpcib_softc), ichpcib_match, ichpcib_attach }; diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c index e0f3a07b5da..dc628e969aa 100644 --- a/sys/arch/i386/pci/pchb.c +++ b/sys/arch/i386/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.92 2020/05/29 04:42:24 deraadt Exp $ */ +/* $OpenBSD: pchb.c,v 1.93 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: pchb.c,v 1.65 2007/08/15 02:26:13 markd Exp $ */ /* @@ -129,7 +129,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/i386/pci/pcib.c b/sys/arch/i386/pci/pcib.c index aa620748d31..ed11f94f661 100644 --- a/sys/arch/i386/pci/pcib.c +++ b/sys/arch/i386/pci/pcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcib.c,v 1.24 2013/05/30 16:15:01 deraadt Exp $ */ +/* $OpenBSD: pcib.c,v 1.25 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: pcib.c,v 1.6 1997/06/06 23:29:16 thorpej Exp $ */ /*- @@ -53,7 +53,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 }; diff --git a/sys/arch/i386/pci/pcibios.c b/sys/arch/i386/pci/pcibios.c index 10890e8d37b..36f19fbfd31 100644 --- a/sys/arch/i386/pci/pcibios.c +++ b/sys/arch/i386/pci/pcibios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcibios.c,v 1.48 2015/09/08 08:33:26 deraadt Exp $ */ +/* $OpenBSD: pcibios.c,v 1.49 2022/02/21 10:24:28 mpi Exp $ */ /* $NetBSD: pcibios.c,v 1.5 2000/08/01 05:23:59 uch Exp $ */ /* @@ -134,7 +134,7 @@ struct cfdriver pcibios_cd = { int pcibiosprobe(struct device *, void *, void *); void pcibiosattach(struct device *, struct device *, void *); -struct cfattach pcibios_ca = { +const struct cfattach pcibios_ca = { sizeof(struct pcibios_softc), pcibiosprobe, pcibiosattach };