drivers/reset: appropriate __init annotation for const data
Subsystems (2)
PATCH 1/1 drivers/reset: appropriate __init annotation for const data
Init data marked const should be annotated with __initconst for correctness and not __initdata. This also fixes LTO builds that otherwise fail with section mismatch errors.
Signed-off-by Nicolas Pitre <[email protected]>
drivers/reset/reset-sunxi.c +1 -1
@@ -122,7 +122,7 @@ err_alloc:* our system, before we can even think of using a regular device * driver for it. */ -static const struct of_device_id sunxi_early_reset_dt_ids[]__initdata = { +static const struct of_device_id sunxi_early_reset_dt_ids[]__initconst = { { .compatible ="allwinner,sun6i-a31-ahb1-reset" , }, {/* sentinel */ }, };
PATCH 1/1 drivers/reset: appropriate __init annotation for const data
Hi Nicolas,
Quoted 6 lines · Nicolas Pitre
Init data marked const should be annotated with
__initconstfor correctness and not__initdata. This also fixes LTO builds that otherwise fail with section mismatch errors.Signed-off-by Nicolas Pitre <[email protected]>
Acked-by Maxime Ripard <[email protected]>
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150725/2a99ea65/attachment.sig>