Message ID | 1343034810-3386-14-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-König wrote: > This prepares *of_device_id.data becoming const. Without this change > the following warning would occur: > > drivers/macintosh/mediabay.c: In function 'media_bay_attach': > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > --- Ack all of these assuming you test built (I didn't). Do you need me to carry any of this via the powerpc tree ? Cheers, Ben. > drivers/macintosh/mediabay.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c > index 831d751..54bf584 100644 > --- a/drivers/macintosh/mediabay.c > +++ b/drivers/macintosh/mediabay.c > @@ -63,7 +63,7 @@ struct media_bay_info { > int value_count; > int timer; > struct macio_dev *mdev; > - struct mb_ops* ops; > + const struct mb_ops* ops; > int index; > int cached_gpio; > int sleeping;
Hello, On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-König wrote: > > This prepares *of_device_id.data becoming const. Without this change > > the following warning would occur: > > > > drivers/macintosh/mediabay.c: In function 'media_bay_attach': > > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > --- > > Ack all of these assuming you test built (I didn't). "all" means the two mediabay patches? And yes, they are all built tested. > Do you need me to > carry any of this via the powerpc tree ? The patch that adds the const to of_device_id depends[1] on this patch. And the other mediabay is only valid after that const is added. So the easiest is if the series is pulled in one go. Arnd intended to let Linus pull it for 3.6-rc1 but it was missed because of a communication problem. So I intend to get it in during the 3.7 merge window. Best regards Uwe [1] it's only a soft depend, because the result is "only" a warning, but still.
On Wed, 2012-09-05 at 10:02 +0200, Uwe Kleine-König wrote: > Hello, > > On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-König wrote: > > > This prepares *of_device_id.data becoming const. Without this change > > > the following warning would occur: > > > > > > drivers/macintosh/mediabay.c: In function 'media_bay_attach': > > > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > > --- > > > > Ack all of these assuming you test built (I didn't). > "all" means the two mediabay patches? And yes, they are all built > tested. Yeah, anything powerpc you had in your series, but the two mediabay ones are what I spotted when digging through stuff today :-) > > Do you need me to > > carry any of this via the powerpc tree ? > The patch that adds the const to of_device_id depends[1] on this patch. > And the other mediabay is only valid after that const is added. So the > easiest is if the series is pulled in one go. Arnd intended to let Linus > pull it for 3.6-rc1 but it was missed because of a communication > problem. So I intend to get it in during the 3.7 merge window. Ok, I'm happy for Arnd to carry all of these, I trust his judgement/review for that stuff including for ppc specific bits. Cheers, Ben. > Best regards > Uwe > > [1] it's only a soft depend, because the result is "only" a warning, but > still. >
On Wed, Sep 05, 2012 at 07:23:43PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-09-05 at 10:02 +0200, Uwe Kleine-König wrote: > > Hello, > > > > On Wed, Sep 05, 2012 at 12:40:17PM +1000, Benjamin Herrenschmidt wrote: > > > On Mon, 2012-07-23 at 11:13 +0200, Uwe Kleine-König wrote: > > > > This prepares *of_device_id.data becoming const. Without this change > > > > the following warning would occur: > > > > > > > > drivers/macintosh/mediabay.c: In function 'media_bay_attach': > > > > drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> > > > > --- > > > > > > Ack all of these assuming you test built (I didn't). > > "all" means the two mediabay patches? And yes, they are all built > > tested. > > Yeah, anything powerpc you had in your series, but the two mediabay ones > are what I spotted when digging through stuff today :-) I added that to serial/mpc52xx_uart: add a const qualifier gpio/mpc8xxx: add a const qualifier i2c/mpc: add a const qualifier macintosh/mediabay: add a const qualifier powerpc/83xx: add a const qualifier powerpc/fsl_msi: add a const qualifier powerpc/celleb_pci: add a const qualifier watchdog/mpc8xxx: add a const qualifier powerpc/fsl_msi: drop unneeded cast to non-const pointer i2c/mpc: make data used as *of_device_id.data const macintosh/mediabay: make data used as *of_device_id.data const can: mpc5xxx_can: make data used as *of_device_id.data const in the hope I didn't interpret "anything powerpc" too wide. Please tell me if I did. Thanks Uwe
On Tue, 2012-09-11 at 08:56 +0200, Uwe Kleine-König wrote: > > in the hope I didn't interpret "anything powerpc" too wide. Please > tell me if I did. No, it's fine with me, give me a git URL if you want me to run that through my various config test builds. Cheers, Ben.
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 831d751..54bf584 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c @@ -63,7 +63,7 @@ struct media_bay_info { int value_count; int timer; struct macio_dev *mdev; - struct mb_ops* ops; + const struct mb_ops* ops; int index; int cached_gpio; int sleeping;
This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/macintosh/mediabay.c: In function 'media_bay_attach': drivers/macintosh/mediabay.c:589:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- drivers/macintosh/mediabay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)