From: mpi Date: Sun, 13 Mar 2022 08:04:13 +0000 (+0000) Subject: Constify struct cfattach. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6aef9a4e4bcb6a36740e54f2ae0d9a714ecc29ec;p=openbsd Constify struct cfattach. ok miod@ --- diff --git a/sys/arch/alpha/alpha/cpu.c b/sys/arch/alpha/alpha/cpu.c index 9f9821a9c99..2f7258a4520 100644 --- a/sys/arch/alpha/alpha/cpu.c +++ b/sys/arch/alpha/alpha/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.44 2020/07/15 08:24:29 fcambus Exp $ */ +/* $OpenBSD: cpu.c,v 1.45 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.44 2000/05/23 05:12:53 thorpej Exp $ */ /*- @@ -107,7 +107,7 @@ u_long cpu_implver, cpu_amask; int cpumatch(struct device *, void *, void *); void cpuattach(struct device *, struct device *, void *); -struct cfattach cpu_ca = { +const struct cfattach cpu_ca = { sizeof(struct device), cpumatch, cpuattach }; diff --git a/sys/arch/alpha/alpha/mainbus.c b/sys/arch/alpha/alpha/mainbus.c index 80f0e736924..d8abf640a17 100644 --- a/sys/arch/alpha/alpha/mainbus.c +++ b/sys/arch/alpha/alpha/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.14 2013/12/22 18:52:34 miod Exp $ */ +/* $OpenBSD: mainbus.c,v 1.15 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mainbus.c,v 1.27 1998/06/24 01:10:35 ross Exp $ */ /* @@ -43,7 +43,7 @@ static int mbmatch(struct device *, void *, void *); static void mbattach(struct device *, struct device *, void *); static int mbprint(void *, const char *); -struct cfattach mainbus_ca = { +const struct cfattach mainbus_ca = { sizeof(struct device), mbmatch, mbattach }; diff --git a/sys/arch/alpha/isa/mcclock_isa.c b/sys/arch/alpha/isa/mcclock_isa.c index d33f8aaa591..89c368a72e4 100644 --- a/sys/arch/alpha/isa/mcclock_isa.c +++ b/sys/arch/alpha/isa/mcclock_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcclock_isa.c,v 1.8 2006/01/02 05:21:24 brad Exp $ */ +/* $OpenBSD: mcclock_isa.c,v 1.9 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mcclock_isa.c,v 1.5 1996/12/05 01:39:29 cgd Exp $ */ /* @@ -50,7 +50,7 @@ struct mcclock_isa_softc { int mcclock_isa_match(struct device *, void *, void *); void mcclock_isa_attach(struct device *, struct device *, void *); -struct cfattach mcclock_isa_ca = { +const struct cfattach mcclock_isa_ca = { sizeof (struct mcclock_isa_softc), mcclock_isa_match, mcclock_isa_attach, }; diff --git a/sys/arch/alpha/mcbus/mcbus.c b/sys/arch/alpha/mcbus/mcbus.c index 27ef68970e3..936d5bd6c55 100644 --- a/sys/arch/alpha/mcbus/mcbus.c +++ b/sys/arch/alpha/mcbus/mcbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcbus.c,v 1.4 2021/03/11 11:16:54 jsg Exp $ */ +/* $OpenBSD: mcbus.c,v 1.5 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mcbus.c,v 1.19 2007/03/04 05:59:11 christos Exp $ */ /* @@ -68,7 +68,7 @@ typedef struct { u_int8_t mcbus_types[MCBUS_MID_MAX]; } mcbus_softc_t; -struct cfattach mcbus_ca = { +const struct cfattach mcbus_ca = { sizeof(mcbus_softc_t), mcbusmatch, mcbusattach }; diff --git a/sys/arch/alpha/mcbus/mcmem.c b/sys/arch/alpha/mcbus/mcmem.c index e736d3d0549..ee8902535f9 100644 --- a/sys/arch/alpha/mcbus/mcmem.c +++ b/sys/arch/alpha/mcbus/mcmem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcmem.c,v 1.2 2012/12/05 23:20:10 deraadt Exp $ */ +/* $OpenBSD: mcmem.c,v 1.3 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mcmem.c,v 1.4 2002/10/02 04:06:38 thorpej Exp $ */ /* @@ -52,7 +52,7 @@ int mcmemmatch (struct device *, void *, void *); void mcmemattach (struct device *, struct device *, void *); -struct cfattach mcmem_ca = { +const struct cfattach mcmem_ca = { sizeof(struct device), mcmemmatch, mcmemattach }; diff --git a/sys/arch/alpha/pci/apecs.c b/sys/arch/alpha/pci/apecs.c index 43dc7578570..9a8c08c03d0 100644 --- a/sys/arch/alpha/pci/apecs.c +++ b/sys/arch/alpha/pci/apecs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apecs.c,v 1.22 2009/03/30 21:43:13 kettenis Exp $ */ +/* $OpenBSD: apecs.c,v 1.23 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: apecs.c,v 1.16 1996/12/05 01:39:34 cgd Exp $ */ /*- @@ -90,7 +90,7 @@ int apecsmatch(struct device *, void *, void *); void apecsattach(struct device *, struct device *, void *); -struct cfattach apecs_ca = { +const struct cfattach apecs_ca = { sizeof(struct device), apecsmatch, apecsattach, }; diff --git a/sys/arch/alpha/pci/cia.c b/sys/arch/alpha/pci/cia.c index d1b172cad65..daf3ffc4c98 100644 --- a/sys/arch/alpha/pci/cia.c +++ b/sys/arch/alpha/pci/cia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cia.c,v 1.26 2017/10/20 12:05:01 mpi Exp $ */ +/* $OpenBSD: cia.c,v 1.27 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: cia.c,v 1.56 2000/06/29 08:58:45 mrg Exp $ */ /*- @@ -95,7 +95,7 @@ int ciamatch(struct device *, void *, void *); void ciaattach(struct device *, struct device *, void *); -struct cfattach cia_ca = { +const struct cfattach cia_ca = { sizeof(struct device), ciamatch, ciaattach, }; diff --git a/sys/arch/alpha/pci/irongate.c b/sys/arch/alpha/pci/irongate.c index 4e32d716391..30e6a6f165a 100644 --- a/sys/arch/alpha/pci/irongate.c +++ b/sys/arch/alpha/pci/irongate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irongate.c,v 1.11 2009/03/30 21:43:13 kettenis Exp $ */ +/* $OpenBSD: irongate.c,v 1.12 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: irongate.c,v 1.3 2000/11/29 06:29:10 thorpej Exp $ */ /*- @@ -53,7 +53,7 @@ int irongate_match(struct device *, void *, void *); void irongate_attach(struct device *, struct device *, void *); -struct cfattach irongate_ca = { +const struct cfattach irongate_ca = { sizeof(struct device), irongate_match, irongate_attach, }; diff --git a/sys/arch/alpha/pci/lca.c b/sys/arch/alpha/pci/lca.c index 48474e38813..54fca04ba70 100644 --- a/sys/arch/alpha/pci/lca.c +++ b/sys/arch/alpha/pci/lca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lca.c,v 1.23 2013/06/04 19:12:34 miod Exp $ */ +/* $OpenBSD: lca.c,v 1.24 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: lca.c,v 1.14 1996/12/05 01:39:35 cgd Exp $ */ /*- @@ -89,7 +89,7 @@ int lcamatch(struct device *, void *, void *); void lcaattach(struct device *, struct device *, void *); -struct cfattach lca_ca = { +const struct cfattach lca_ca = { sizeof(struct device), lcamatch, lcaattach, }; diff --git a/sys/arch/alpha/pci/mcpcia.c b/sys/arch/alpha/pci/mcpcia.c index d0326ae347d..3e66b8a6095 100644 --- a/sys/arch/alpha/pci/mcpcia.c +++ b/sys/arch/alpha/pci/mcpcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcpcia.c,v 1.6 2012/12/05 23:20:10 deraadt Exp $ */ +/* $OpenBSD: mcpcia.c,v 1.7 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mcpcia.c,v 1.20 2007/03/04 05:59:11 christos Exp $ */ /*- @@ -99,7 +99,7 @@ void mcpcia_config_cleanup (void); int mcpciaprint (void *, const char *); -struct cfattach mcpcia_ca = { +const struct cfattach mcpcia_ca = { sizeof(struct mcpcia_softc), mcpciamatch, mcpciaattach }; diff --git a/sys/arch/alpha/pci/sio.c b/sys/arch/alpha/pci/sio.c index 8a9191f57ef..fc98d492a85 100644 --- a/sys/arch/alpha/pci/sio.c +++ b/sys/arch/alpha/pci/sio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sio.c,v 1.40 2015/08/15 19:26:00 miod Exp $ */ +/* $OpenBSD: sio.c,v 1.41 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: sio.c,v 1.15 1996/12/05 01:39:36 cgd Exp $ */ /* @@ -79,7 +79,7 @@ struct cfdriver sio_cd = { int pcebmatch(struct device *, void *, void *); -struct cfattach pceb_ca = { +const struct cfattach pceb_ca = { sizeof(struct sio_softc), pcebmatch, sioattach, }; diff --git a/sys/arch/alpha/pci/tsc.c b/sys/arch/alpha/pci/tsc.c index 8549752d96a..b68f7e83f2d 100644 --- a/sys/arch/alpha/pci/tsc.c +++ b/sys/arch/alpha/pci/tsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsc.c,v 1.16 2014/12/24 18:46:14 miod Exp $ */ +/* $OpenBSD: tsc.c,v 1.17 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: tsc.c,v 1.3 2000/06/25 19:17:40 thorpej Exp $ */ /*- @@ -56,7 +56,7 @@ int tscmatch(struct device *, void *, void *); void tscattach(struct device *, struct device *, void *); -struct cfattach tsc_ca = { +const struct cfattach tsc_ca = { sizeof(struct device), tscmatch, tscattach, }; @@ -71,7 +71,7 @@ static int tscprint(void *, const char *pnp); int tspmatch(struct device *, void *, void *); void tspattach(struct device *, struct device *, void *); -struct cfattach tsp_ca = { +const struct cfattach tsp_ca = { sizeof(struct tsp_softc), tspmatch, tspattach, }; diff --git a/sys/arch/alpha/tc/ioasic.c b/sys/arch/alpha/tc/ioasic.c index 6e507095bca..89fc00c10cb 100644 --- a/sys/arch/alpha/tc/ioasic.c +++ b/sys/arch/alpha/tc/ioasic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioasic.c,v 1.18 2017/10/11 08:14:28 mpi Exp $ */ +/* $OpenBSD: ioasic.c,v 1.19 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: ioasic.c,v 1.34 2000/07/18 06:10:06 thorpej Exp $ */ /*- @@ -81,7 +81,7 @@ int ioasicmatch(struct device *, void *, void *); void ioasicattach(struct device *, struct device *, void *); -struct cfattach ioasic_ca = { +const struct cfattach ioasic_ca = { sizeof(struct ioasic_softc), ioasicmatch, ioasicattach, }; diff --git a/sys/arch/alpha/tc/mcclock_ioasic.c b/sys/arch/alpha/tc/mcclock_ioasic.c index da7e8e7a4f6..06024870c5a 100644 --- a/sys/arch/alpha/tc/mcclock_ioasic.c +++ b/sys/arch/alpha/tc/mcclock_ioasic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcclock_ioasic.c,v 1.6 2002/05/02 22:56:06 miod Exp $ */ +/* $OpenBSD: mcclock_ioasic.c,v 1.7 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: mcclock_ioasic.c,v 1.9 2000/07/04 02:37:51 nisimura Exp $ */ /* @@ -53,7 +53,7 @@ struct mcclock_ioasic_softc { int mcclock_ioasic_match(struct device *, void *, void *); void mcclock_ioasic_attach(struct device *, struct device *, void *); -struct cfattach mcclock_ioasic_ca = { +const struct cfattach mcclock_ioasic_ca = { sizeof (struct mcclock_ioasic_softc), mcclock_ioasic_match, mcclock_ioasic_attach, }; diff --git a/sys/arch/alpha/tc/tcasic.c b/sys/arch/alpha/tc/tcasic.c index 45ec602ea23..9145d85b0b1 100644 --- a/sys/arch/alpha/tc/tcasic.c +++ b/sys/arch/alpha/tc/tcasic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcasic.c,v 1.18 2020/05/23 08:40:55 jsg Exp $ */ +/* $OpenBSD: tcasic.c,v 1.19 2022/03/13 08:04:13 mpi Exp $ */ /* $NetBSD: tcasic.c,v 1.36 2001/08/23 01:16:52 nisimura Exp $ */ /* @@ -44,7 +44,7 @@ int tcasicmatch(struct device *, void *, void *); void tcasicattach(struct device *, struct device *, void *); int tcasicactivate(struct device *, int); -struct cfattach tcasic_ca = { +const struct cfattach tcasic_ca = { .ca_devsize = sizeof (struct device), .ca_match = tcasicmatch, .ca_attach = tcasicattach,