All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can: mpc5xxx_can: fix section type conflict
@ 2012-10-04 14:34 Marc Kleine-Budde
  2012-10-04 15:20 ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-10-04 14:34 UTC (permalink / raw)
  To: linux-can; +Cc: kernel, Marc Kleine-Budde, Arnd Bergmann

Since commit:
    6d99c4c can: mpc5xxx_can: make data used as *of_device_id.data const

both "struct mpc5xxx_can_data mpc5200_can_data" and "mpc5121_can_data" are
marked as "const" but also as "__devinitdata". This leads to the following
compile error:

drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict
drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict

This patch changes the "__devinitdata" to "__devinitconst" and marks the
"struct of_device_id mpc5xxx_can_table" as "const" and "__devinitconst", too.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/mscan/mpc5xxx_can.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index c975999..799c354 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
 }
 #endif /* CONFIG_PPC_MPC512x */
 
-static struct of_device_id mpc5xxx_can_table[];
+static const struct of_device_id mpc5xxx_can_table[];
 static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
 {
 	const struct of_device_id *match;
@@ -380,17 +380,17 @@ static int mpc5xxx_can_resume(struct platform_device *ofdev)
 }
 #endif
 
-static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = {
+static const struct mpc5xxx_can_data __devinitconst mpc5200_can_data = {
 	.type = MSCAN_TYPE_MPC5200,
 	.get_clock = mpc52xx_can_get_clock,
 };
 
-static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = {
+static const struct mpc5xxx_can_data __devinitconst mpc5121_can_data = {
 	.type = MSCAN_TYPE_MPC5121,
 	.get_clock = mpc512x_can_get_clock,
 };
 
-static struct of_device_id __devinitdata mpc5xxx_can_table[] = {
+static const struct of_device_id __devinitconst mpc5xxx_can_table[] = {
 	{ .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, },
 	/* Note that only MPC5121 Rev. 2 (and later) is supported */
 	{ .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, },
-- 
1.7.10


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

* Re: [PATCH] can: mpc5xxx_can: fix section type conflict
  2012-10-04 14:34 [PATCH] can: mpc5xxx_can: fix section type conflict Marc Kleine-Budde
@ 2012-10-04 15:20 ` Uwe Kleine-König
  2012-10-04 16:44   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2012-10-04 15:20 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-can, kernel, Arnd Bergmann

Hello,

On Thu, Oct 04, 2012 at 04:34:09PM +0200, Marc Kleine-Budde wrote:
> Since commit:
>     6d99c4c can: mpc5xxx_can: make data used as *of_device_id.data const
> 
> both "struct mpc5xxx_can_data mpc5200_can_data" and "mpc5121_can_data" are
> marked as "const" but also as "__devinitdata". This leads to the following
> compile error:
> 
> drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
> drivers/net/can/mscan/mpc5xxx_can.c:383: error: mpc5200_can_data causes a section type conflict
> drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict
> drivers/net/can/mscan/mpc5xxx_can.c:388: error: mpc5121_can_data causes a section type conflict
> 
> This patch changes the "__devinitdata" to "__devinitconst" and marks the
> "struct of_device_id mpc5xxx_can_table" as "const" and "__devinitconst", too.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Re: [PATCH] can: mpc5xxx_can: fix section type conflict
  2012-10-04 15:20 ` Uwe Kleine-König
@ 2012-10-04 16:44   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2012-10-04 16:44 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Marc Kleine-Budde, linux-can, kernel

On Thursday 04 October 2012, Uwe Kleine-König wrote:
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

end of thread, other threads:[~2012-10-04 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-04 14:34 [PATCH] can: mpc5xxx_can: fix section type conflict Marc Kleine-Budde
2012-10-04 15:20 ` Uwe Kleine-König
2012-10-04 16:44   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.