* make user of struct of_device_id.data const
@ 2012-07-13 13:04 Marc Kleine-Budde
2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2012-07-13 13:04 UTC (permalink / raw)
To: linux-can; +Cc: kernel
Hello,
my coworker Uwe just posted a series to make of_device_id.data const [1].
This series changes the users of of_device_id.data to const in the CAN tree.
Marc
[1] http://www.spinics.net/lists/arm-kernel/msg184407.html
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data 2012-07-13 13:04 make user of struct of_device_id.data const Marc Kleine-Budde @ 2012-07-13 13:04 ` Marc Kleine-Budde 2012-07-16 8:21 ` Uwe Kleine-König 2012-07-13 13:04 ` [PATCH 2/2] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Marc Kleine-Budde 2012-07-13 13:35 ` make user of struct of_device_id.data const Uwe Kleine-König 2 siblings, 1 reply; 7+ messages in thread From: Marc Kleine-Budde @ 2012-07-13 13:04 UTC (permalink / raw) To: linux-can; +Cc: kernel, Marc Kleine-Budde Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- drivers/net/can/flexcan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 81324a1..1b6f562 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -192,7 +192,7 @@ struct flexcan_priv { struct clk *clk; struct flexcan_platform_data *pdata; - struct flexcan_devtype_data *devtype_data; + const struct flexcan_devtype_data *devtype_data; }; static struct flexcan_devtype_data fsl_p1010_devtype_data = { @@ -960,7 +960,7 @@ static const struct platform_device_id flexcan_id_table[] = { static int __devinit flexcan_probe(struct platform_device *pdev) { const struct of_device_id *of_id; - struct flexcan_devtype_data *devtype_data; + const struct flexcan_devtype_data *devtype_data; struct net_device *dev; struct flexcan_priv *priv; struct resource *mem; -- 1.7.10 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data 2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde @ 2012-07-16 8:21 ` Uwe Kleine-König 2012-07-16 8:28 ` Marc Kleine-Budde 0 siblings, 1 reply; 7+ messages in thread From: Uwe Kleine-König @ 2012-07-16 8:21 UTC (permalink / raw) To: Marc Kleine-Budde; +Cc: linux-can, kernel Hello, On Fri, Jul 13, 2012 at 03:04:23PM +0200, Marc Kleine-Budde wrote: > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > --- > drivers/net/can/flexcan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c > index 81324a1..1b6f562 100644 > --- a/drivers/net/can/flexcan.c > +++ b/drivers/net/can/flexcan.c > @@ -192,7 +192,7 @@ struct flexcan_priv { > > struct clk *clk; > struct flexcan_platform_data *pdata; > - struct flexcan_devtype_data *devtype_data; > + const struct flexcan_devtype_data *devtype_data; > }; > > static struct flexcan_devtype_data fsl_p1010_devtype_data = { > @@ -960,7 +960,7 @@ static const struct platform_device_id flexcan_id_table[] = { > static int __devinit flexcan_probe(struct platform_device *pdev) > { > const struct of_device_id *of_id; > - struct flexcan_devtype_data *devtype_data; > + const struct flexcan_devtype_data *devtype_data; > struct net_device *dev; > struct flexcan_priv *priv; > struct resource *mem; Maybe this can be squashed into 30c1e67 (can: flexcan: add hardware controller version support) (currently in next) together with making fsl_p1010_devtype_data and fsl_imx6q_devtype_data const? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data 2012-07-16 8:21 ` Uwe Kleine-König @ 2012-07-16 8:28 ` Marc Kleine-Budde 2012-07-16 9:50 ` Uwe Kleine-König 0 siblings, 1 reply; 7+ messages in thread From: Marc Kleine-Budde @ 2012-07-16 8:28 UTC (permalink / raw) To: Uwe Kleine-König; +Cc: linux-can, kernel [-- Attachment #1: Type: text/plain, Size: 2084 bytes --] On 07/16/2012 10:21 AM, Uwe Kleine-König wrote: > Hello, > > On Fri, Jul 13, 2012 at 03:04:23PM +0200, Marc Kleine-Budde wrote: >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> >> --- >> drivers/net/can/flexcan.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c >> index 81324a1..1b6f562 100644 >> --- a/drivers/net/can/flexcan.c >> +++ b/drivers/net/can/flexcan.c >> @@ -192,7 +192,7 @@ struct flexcan_priv { >> >> struct clk *clk; >> struct flexcan_platform_data *pdata; >> - struct flexcan_devtype_data *devtype_data; >> + const struct flexcan_devtype_data *devtype_data; >> }; >> >> static struct flexcan_devtype_data fsl_p1010_devtype_data = { >> @@ -960,7 +960,7 @@ static const struct platform_device_id flexcan_id_table[] = { >> static int __devinit flexcan_probe(struct platform_device *pdev) >> { >> const struct of_device_id *of_id; >> - struct flexcan_devtype_data *devtype_data; >> + const struct flexcan_devtype_data *devtype_data; >> struct net_device *dev; >> struct flexcan_priv *priv; >> struct resource *mem; > Maybe this can be squashed into > > 30c1e67 (can: flexcan: add hardware controller version support) > > (currently in next) together with making fsl_p1010_devtype_data and > fsl_imx6q_devtype_data const? Squashing is not possible, because it's already in David's tree. If I mark fsl_p1010_devtype_data and fsl_imx6q_devtype_data as const, I get these errors: drivers/net/can/flexcan.c:950: warning: initialization discards qualifiers from pointer target type drivers/net/can/flexcan.c:951: warning: initialization discards qualifiers from pointer target type In a tree without you proposed patch. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 262 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data 2012-07-16 8:28 ` Marc Kleine-Budde @ 2012-07-16 9:50 ` Uwe Kleine-König 0 siblings, 0 replies; 7+ messages in thread From: Uwe Kleine-König @ 2012-07-16 9:50 UTC (permalink / raw) To: Marc Kleine-Budde; +Cc: linux-can, kernel On Mon, Jul 16, 2012 at 10:28:24AM +0200, Marc Kleine-Budde wrote: > On 07/16/2012 10:21 AM, Uwe Kleine-König wrote: > > Hello, > > > > On Fri, Jul 13, 2012 at 03:04:23PM +0200, Marc Kleine-Budde wrote: > >> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> > >> --- > >> drivers/net/can/flexcan.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c > >> index 81324a1..1b6f562 100644 > >> --- a/drivers/net/can/flexcan.c > >> +++ b/drivers/net/can/flexcan.c > >> @@ -192,7 +192,7 @@ struct flexcan_priv { > >> > >> struct clk *clk; > >> struct flexcan_platform_data *pdata; > >> - struct flexcan_devtype_data *devtype_data; > >> + const struct flexcan_devtype_data *devtype_data; > >> }; > >> > >> static struct flexcan_devtype_data fsl_p1010_devtype_data = { > >> @@ -960,7 +960,7 @@ static const struct platform_device_id flexcan_id_table[] = { > >> static int __devinit flexcan_probe(struct platform_device *pdev) > >> { > >> const struct of_device_id *of_id; > >> - struct flexcan_devtype_data *devtype_data; > >> + const struct flexcan_devtype_data *devtype_data; > >> struct net_device *dev; > >> struct flexcan_priv *priv; > >> struct resource *mem; > > Maybe this can be squashed into > > > > 30c1e67 (can: flexcan: add hardware controller version support) > > > > (currently in next) together with making fsl_p1010_devtype_data and > > fsl_imx6q_devtype_data const? > > Squashing is not possible, because it's already in David's tree. If I ok. > mark fsl_p1010_devtype_data and fsl_imx6q_devtype_data as const, I get > these errors: > > drivers/net/can/flexcan.c:950: warning: initialization discards > qualifiers from pointer target type > drivers/net/can/flexcan.c:951: warning: initialization discards > qualifiers from pointer target type > > In a tree without you proposed patch. ah, right. My tree is based on v3.5-rc which doesn't have 30c1e67 yet, so I make a mental note to add the consts when both patches hit mainline. Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] can: mpc5xxx_can: make data in mpc5xxx_can_probe const 2012-07-13 13:04 make user of struct of_device_id.data const Marc Kleine-Budde 2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde @ 2012-07-13 13:04 ` Marc Kleine-Budde 2012-07-13 13:35 ` make user of struct of_device_id.data const Uwe Kleine-König 2 siblings, 0 replies; 7+ messages in thread From: Marc Kleine-Budde @ 2012-07-13 13:04 UTC (permalink / raw) To: linux-can; +Cc: kernel, Marc Kleine-Budde Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> --- drivers/net/can/mscan/mpc5xxx_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 5caa572..06adf88 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c @@ -251,7 +251,7 @@ static struct of_device_id mpc5xxx_can_table[]; static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) { const struct of_device_id *match; - struct mpc5xxx_can_data *data; + const struct mpc5xxx_can_data *data; struct device_node *np = ofdev->dev.of_node; struct net_device *dev; struct mscan_priv *priv; -- 1.7.10 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: make user of struct of_device_id.data const 2012-07-13 13:04 make user of struct of_device_id.data const Marc Kleine-Budde 2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde 2012-07-13 13:04 ` [PATCH 2/2] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Marc Kleine-Budde @ 2012-07-13 13:35 ` Uwe Kleine-König 2 siblings, 0 replies; 7+ messages in thread From: Uwe Kleine-König @ 2012-07-13 13:35 UTC (permalink / raw) To: Marc Kleine-Budde; +Cc: linux-can, kernel Hello, On Fri, Jul 13, 2012 at 03:04:22PM +0200, Marc Kleine-Budde wrote: > my coworker Uwe just posted a series to make of_device_id.data const [1]. > This series changes the users of of_device_id.data to const in the CAN tree. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Note that even if the series doesn't go in as is (because more users might need fixing) these two patches by Marc are nice independently of actually making of_device_id.data const. Thanks and best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-16 9:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-07-13 13:04 make user of struct of_device_id.data const Marc Kleine-Budde 2012-07-13 13:04 ` [PATCH 1/2] can: flexcan: make flexcan_priv.devtype_data member point to const data Marc Kleine-Budde 2012-07-16 8:21 ` Uwe Kleine-König 2012-07-16 8:28 ` Marc Kleine-Budde 2012-07-16 9:50 ` Uwe Kleine-König 2012-07-13 13:04 ` [PATCH 2/2] can: mpc5xxx_can: make data in mpc5xxx_can_probe const Marc Kleine-Budde 2012-07-13 13:35 ` make user of struct of_device_id.data const Uwe Kleine-König
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).