linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [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

* [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, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2015-07-25  6:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

On Fri, Jul 24, 2015 at 03:34:11PM -0400, Nicolas Pitre wrote:
> 
> 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>

Thanks!
Maxime

-- 
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>

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

* [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-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
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Zabel @ 2015-11-23 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

Am Samstag, den 21.11.2015, 20:56 -0500 schrieb Nicolas Pitre:
> 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 */ },
>  };

Thank you for the patch, this change is already contained in the latest
pull request sent to the arm-soc maintainers.

best regards
Philipp

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

* [PATCH] drivers/reset: appropriate __init annotation for const data
  2015-11-23 10:56 ` Philipp Zabel
@ 2015-11-23 14:47   ` Nicolas Pitre
  2015-11-23 15:21     ` Philipp Zabel
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Pitre @ 2015-11-23 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 23 Nov 2015, Philipp Zabel wrote:

> Hi Nicolas,
> 
> Am Samstag, den 21.11.2015, 20:56 -0500 schrieb Nicolas Pitre:
> > 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 */ },
> >  };
> 
> Thank you for the patch, this change is already contained in the latest
> pull request sent to the arm-soc maintainers.

OK.  I initially posted it in July but it didn't show up in v4.2 nor in 
v4.3. I concluded it fell into a crack.


Nicolas

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

* [PATCH] drivers/reset: appropriate __init annotation for const data
  2015-11-23 14:47   ` Nicolas Pitre
@ 2015-11-23 15:21     ` Philipp Zabel
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2015-11-23 15:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

Am Montag, den 23.11.2015, 09:47 -0500 schrieb Nicolas Pitre:
> On Mon, 23 Nov 2015, Philipp Zabel wrote:
> 
> > Hi Nicolas,
> > 
> > Am Samstag, den 21.11.2015, 20:56 -0500 schrieb Nicolas Pitre:
> > > 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 */ },
> > >  };
> > 
> > Thank you for the patch, this change is already contained in the latest
> > pull request sent to the arm-soc maintainers.
> 
> OK.  I initially posted it in July but it didn't show up in v4.2 nor in 
> v4.3. I concluded it fell into a crack.

It did, I'm sorry. Please feel free to be more aggressive about
reminding me when you think I might have dropped something on the floor.

regards
Philipp

^ permalink raw reply	[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).