From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
kernel@pengutronix.de,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH RESEND] of: add const to struct of_device_id.data
Date: Sun, 24 Jun 2012 16:43:20 +0200 [thread overview]
Message-ID: <20120624144320.GB28001@pengutronix.de> (raw)
In-Reply-To: <201206221726.22285.arnd@arndb.de>
Hello Arnd,
On Fri, Jun 22, 2012 at 05:26:22PM +0000, Arnd Bergmann wrote:
> On Friday 22 June 2012, Uwe Kleine-König wrote:
> > On Thu, Jun 07, 2012 at 12:20:14PM +0200, Uwe Kleine-König wrote:
> > > Drivers should never need to modify the data of a device id. So it can
> > > be const which in turn allows more consts in the driver.
> > >
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > > (Cc += lkml + Grant)
> > >
> > > Hello,
> > >
> > > this might introduce warnings in drivers that access the data member
> > > without using const, so this is definitly merge window material if it is
> > > considered at all.
> >
> > ping
>
> Sorry for the delayed response. I think the approach is right, but I
> am a bit worried about adding warnings for legit code.
>
> A quick test with the defconfigs gave me this error for prima2_defconfig
> and kzm9g_defconfig:
>
> /home/arnd/linux-arm/arch/arm/mm/cache-l2x0.c: In function 'l2x0_of_init':
> /home/arnd/linux-arm/arch/arm/mm/cache-l2x0.c:573:7: error: assignment discards 'const' qualifier from pointer target type [-Werror]
I already sent a patch for that to rmk's patch system:
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7429/1
Russell commented:
Sigh, a gmane.org URL. Which is difficult to dig the thread out of.
Eventually you can. And I see nothing which suggests that the series
will be applied or, more importantly when it is going to be applied.
Punting this patch until there's better communication.
Russell, I didn't completely get your problem about gmane here. If you
follow the link in the Subject: line, you get a thread view. Does this
address your concerns?
And even without the of: add const to struct of_device_id.data patch
patch using more consts is IMHO nice.
> and this one with at91sam9263_defconfig:
> /home/arnd/linux-arm/drivers/misc/atmel_tclib.c: In function 'tc_probe':
> /home/arnd/linux-arm/drivers/misc/atmel_tclib.c:170:19: error: assignment discards 'const' qualifier from pointer target type [-Werror]
>
> I haven't checked all the defconfigs yet, but I think we should at least
> make sure they build fine before applying your patch.
Fine for me, I will come up with a series next week.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
prev parent reply other threads:[~2012-06-24 14:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 8:56 [PATCH] of: add const to struct of_device_id.data Uwe Kleine-König
[not found] ` <1335171381-24869-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-05-18 14:43 ` Uwe Kleine-König
2012-05-21 19:49 ` [PATCH] spi/imx: make devtype_data member point to const data Uwe Kleine-König
[not found] ` <1337629775-9166-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-06-22 5:50 ` Uwe Kleine-König
2012-05-21 19:54 ` [PATCH] ARM: cache-l2x0: add a const qualifier Uwe Kleine-König
2012-05-21 19:57 ` [PATCH] serial/imx: make devdata member point to const data Uwe Kleine-König
2012-06-07 10:20 ` [PATCH RESEND] of: add const to struct of_device_id.data Uwe Kleine-König
2012-06-22 5:56 ` Uwe Kleine-König
2012-06-22 17:26 ` Arnd Bergmann
2012-06-24 14:43 ` Uwe Kleine-König [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120624144320.GB28001@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).