linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/reset: appropriate __init annotation for const data
@ 2015-11-22  1:56 Nicolas Pitre
  2015-11-23 10:56 ` Philipp Zabel
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2015-11-22  1:56 UTC (permalink / raw)
  To: linux-arm-kernel

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 <nico@linaro.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 3d95c87160..9353b2dd15 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -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 */ },
 };

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH] drivers/reset: appropriate __init annotation for const data
@ 2015-07-24 19:34 Nicolas Pitre
  2015-07-25  6:33 ` Maxime Ripard
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2015-07-24 19:34 UTC (permalink / raw)
  To: linux-arm-kernel


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 <nico@linaro.org>

diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index 3d95c87160..9353b2dd15 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -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 */ },
 };

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-23 15:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-22  1:56 [PATCH] drivers/reset: appropriate __init annotation for const data Nicolas Pitre
2015-11-23 10:56 ` Philipp Zabel
2015-11-23 14:47   ` Nicolas Pitre
2015-11-23 15:21     ` Philipp Zabel
  -- strict thread matches above, loose matches on Subject: below --
2015-07-24 19:34 Nicolas Pitre
2015-07-25  6:33 ` Maxime Ripard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).