From: mpi Date: Sat, 12 Mar 2022 14:40:41 +0000 (+0000) Subject: Constify struct cfattach. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e3ee5e84dc669f4c7e7a1c5b49579d9f9435a524;p=openbsd Constify struct cfattach. ok patrick@ --- diff --git a/sys/arch/arm/arm/cpu.c b/sys/arch/arm/arm/cpu.c index 8c0125cf94d..9c1b78c9af5 100644 --- a/sys/arch/arm/arm/cpu.c +++ b/sys/arch/arm/arm/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.56 2021/11/26 14:45:13 jsg Exp $ */ +/* $OpenBSD: cpu.c,v 1.57 2022/03/12 14:40:41 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.56 2004/04/14 04:01:49 bsh Exp $ */ @@ -145,7 +145,7 @@ int cpu_node; int cpu_match(struct device *, void *, void *); void cpu_attach(struct device *, struct device *, void *); -struct cfattach cpu_ca = { +const struct cfattach cpu_ca = { sizeof(struct device), cpu_match, cpu_attach }; diff --git a/sys/arch/arm/cortex/agtimer.c b/sys/arch/arm/cortex/agtimer.c index b2ec10dbc63..6b5505fb586 100644 --- a/sys/arch/arm/cortex/agtimer.c +++ b/sys/arch/arm/cortex/agtimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agtimer.c,v 1.14 2021/05/16 03:39:27 jsg Exp $ */ +/* $OpenBSD: agtimer.c,v 1.15 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2011 Dale Rahn * Copyright (c) 2013 Patrick Wildt @@ -85,7 +85,7 @@ void agtimer_setstatclockrate(int stathz); void agtimer_set_clockrate(int32_t new_frequency); void agtimer_startclock(void); -struct cfattach agtimer_ca = { +const struct cfattach agtimer_ca = { sizeof (struct agtimer_softc), agtimer_match, agtimer_attach }; diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c index 9689599948a..f0d4e3f72bc 100644 --- a/sys/arch/arm/cortex/ampintc.c +++ b/sys/arch/arm/cortex/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.30 2022/01/03 03:06:49 jsg Exp $ */ +/* $OpenBSD: ampintc.c,v 1.31 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -199,7 +199,7 @@ int ampintc_ipi_nop(void *); int ampintc_ipi_ddb(void *); void ampintc_send_ipi(struct cpu_info *, int); -struct cfattach ampintc_ca = { +const struct cfattach ampintc_ca = { sizeof (struct ampintc_softc), ampintc_match, ampintc_attach }; @@ -836,7 +836,7 @@ struct ampintc_msi_softc { struct interrupt_controller sc_ic; }; -struct cfattach ampintcmsi_ca = { +const struct cfattach ampintcmsi_ca = { sizeof (struct ampintc_msi_softc), ampintc_msi_match, ampintc_msi_attach }; diff --git a/sys/arch/arm/cortex/amptimer.c b/sys/arch/arm/cortex/amptimer.c index 7c5ff9b6aac..61e32ead392 100644 --- a/sys/arch/arm/cortex/amptimer.c +++ b/sys/arch/arm/cortex/amptimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amptimer.c,v 1.13 2021/05/16 03:39:27 jsg Exp $ */ +/* $OpenBSD: amptimer.c,v 1.14 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2011 Dale Rahn * @@ -122,7 +122,7 @@ void *ampintc_intr_establish(int, int, int, struct cpu_info *, -struct cfattach amptimer_ca = { +const struct cfattach amptimer_ca = { sizeof (struct amptimer_softc), amptimer_match, amptimer_attach }; diff --git a/sys/arch/arm/cortex/arml2cc.c b/sys/arch/arm/cortex/arml2cc.c index b399708b3b3..4d79d6aded3 100644 --- a/sys/arch/arm/cortex/arml2cc.c +++ b/sys/arch/arm/cortex/arml2cc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arml2cc.c,v 1.7 2021/05/16 15:10:19 deraadt Exp $ */ +/* $OpenBSD: arml2cc.c,v 1.8 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2013 Patrick Wildt * @@ -111,7 +111,7 @@ void arml2cc_cache_op(struct arml2cc_softc *, bus_size_t, uint32_t); void arml2cc_cache_sync(struct arml2cc_softc *); void arml2cc_sdcache_drain_writebuf(void); -struct cfattach armliicc_ca = { +const struct cfattach armliicc_ca = { sizeof (struct arml2cc_softc), arml2cc_match, arml2cc_attach }; diff --git a/sys/arch/arm/cortex/cortex.c b/sys/arch/arm/cortex/cortex.c index 3259001bd2b..3a55612aac2 100644 --- a/sys/arch/arm/cortex/cortex.c +++ b/sys/arch/arm/cortex/cortex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cortex.c,v 1.6 2020/04/29 15:25:07 kettenis Exp $ */ +/* $OpenBSD: cortex.c,v 1.7 2022/03/12 14:40:41 mpi Exp $ */ /* $NetBSD: mainbus.c,v 1.3 2001/06/13 17:52:43 nathanw Exp $ */ /* @@ -80,7 +80,7 @@ int cortexsearch(struct device *, void *, void *); /* attach and device structures for the device */ -struct cfattach cortex_ca = { +const struct cfattach cortex_ca = { sizeof(struct device), cortexmatch, cortexattach, NULL, config_activate_children }; diff --git a/sys/arch/arm/mainbus/mainbus.c b/sys/arch/arm/mainbus/mainbus.c index ea2e34ddd38..e5badd4b781 100644 --- a/sys/arch/arm/mainbus/mainbus.c +++ b/sys/arch/arm/mainbus/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.23 2020/08/26 03:29:05 visa Exp $ */ +/* $OpenBSD: mainbus.c,v 1.24 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * Copyright (c) 2017 Mark Kettenis @@ -50,7 +50,7 @@ struct mainbus_softc { int sc_early; }; -struct cfattach mainbus_ca = { +const struct cfattach mainbus_ca = { sizeof(struct mainbus_softc), mainbus_match, mainbus_attach, NULL, config_activate_children }; diff --git a/sys/arch/arm/simplebus/simplebus.c b/sys/arch/arm/simplebus/simplebus.c index b772cbe7e1b..7fac1db12ce 100644 --- a/sys/arch/arm/simplebus/simplebus.c +++ b/sys/arch/arm/simplebus/simplebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: simplebus.c,v 1.18 2021/12/06 20:01:54 kettenis Exp $ */ +/* $OpenBSD: simplebus.c,v 1.19 2022/03/12 14:40:41 mpi Exp $ */ /* * Copyright (c) 2016 Patrick Wildt * @@ -39,7 +39,7 @@ int simplebus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, int simplebus_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t, bus_dma_segment_t *, int, bus_size_t, int); -struct cfattach simplebus_ca = { +const struct cfattach simplebus_ca = { sizeof(struct simplebus_softc), simplebus_match, simplebus_attach };