Patchwork mtd: mxc_nand: Fix compiler warnings

login
register
mail settings
Submitter Dirk Behme
Date July 28, 2012, 9:05 a.m.
Message ID <1343466310-14584-1-git-send-email-dirk.behme@gmail.com>
Download mbox | patch
Permalink /patch/173844/
State New
Headers show

Comments

Dirk Behme - July 28, 2012, 9:05 a.m.
From: Dirk Behme <dirk.behme@googlemail.com>

Fix the compiler warnings

drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
---
 drivers/mtd/nand/mxc_nand.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Uwe Kleine-König - July 30, 2012, 7:34 a.m.
Hello,

On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
> From: Dirk Behme <dirk.behme@googlemail.com>
> 
> Fix the compiler warnings
> 
> drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
> drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
> drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
> drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
These should be gone in next already.

Best regards,
Uwe
Dirk Behme - Aug. 4, 2012, 3:47 p.m.
On 30.07.2012 09:34, Uwe Kleine-König wrote:
> Hello,
>
> On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
>> From: Dirk Behme<dirk.behme@googlemail.com>
>>
>> Fix the compiler warnings
>>
>> drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
>> drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
>> drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
>> drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
> These should be gone in next already.

Hmm, which next?

I tried linux-next [1] from today (next-20120803, 55fa9961f) and still get

 > make drivers/mtd/nand/
...
  CC      drivers/mtd/nand/mxc_nand.o 

drivers/mtd/nand/mxc_nand.c:1298: warning: initialization discards 
qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1301: warning: initialization discards 
qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1304: warning: initialization discards 
qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1307: warning: initialization discards 
qualifiers from pointer target type
drivers/mtd/nand/mxc_nand.c:1310: warning: initialization discards 
qualifiers from pointer target type
   CC      drivers/mtd/nand/gpmi-nand/gpmi-nand.o
...

Sorry if I missed something ;)

Best regards

Dirk

[1] 
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=shortlog;h=refs/heads/master
Uwe Kleine-König - Aug. 5, 2012, 8:39 a.m.
On Sat, Aug 04, 2012 at 05:47:17PM +0200, Dirk Behme wrote:
> On 30.07.2012 09:34, Uwe Kleine-König wrote:
> >Hello,
> >
> >On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
> >>From: Dirk Behme<dirk.behme@googlemail.com>
> >>
> >>Fix the compiler warnings
> >>
> >>drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
> >>drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
> >>drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
> >>drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
> >These should be gone in next already.
> 
> Hmm, which next?
> 
> I tried linux-next [1] from today (next-20120803, 55fa9961f) and still get
next-20120725 contained 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17, don't
konw why it isn't included in the newer next snapshorts.

Best regards
Uwe
Dirk Behme - Aug. 5, 2012, 10:56 a.m.
On 05.08.2012 10:39, Uwe Kleine-König wrote:
> On Sat, Aug 04, 2012 at 05:47:17PM +0200, Dirk Behme wrote:
>> On 30.07.2012 09:34, Uwe Kleine-König wrote:
>>> Hello,
>>>
>>> On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
>>>> From: Dirk Behme<dirk.behme@googlemail.com>
>>>>
>>>> Fix the compiler warnings
>>>>
>>>> drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
>>> These should be gone in next already.
>>
>> Hmm, which next?
>>
>> I tried linux-next [1] from today (next-20120803, 55fa9961f) and still get
> next-20120725 contained 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17, don't
> konw why it isn't included in the newer next snapshorts.

First, yes, it was part of next-20120725. Second, I can confirm that 
the patch [1] fixes the compiler warnings I reported above. So my 
patch is obsolete now.

And third, strange is the absence in next-20120803 and 3.6-rc1. Do we 
a chance to find out what's ongoing here? It would be a shame if your 
patch get lost.

Many thanks

Dirk


[1] https://patchwork.kernel.org/patch/1226851/
Dirk Behme - Aug. 18, 2012, 9:58 a.m.
On 05.08.2012 10:39, Uwe Kleine-König wrote:
> On Sat, Aug 04, 2012 at 05:47:17PM +0200, Dirk Behme wrote:
>> On 30.07.2012 09:34, Uwe Kleine-König wrote:
>>> Hello,
>>>
>>> On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
>>>> From: Dirk Behme<dirk.behme@googlemail.com>
>>>>
>>>> Fix the compiler warnings
>>>>
>>>> drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
>>>> drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
>>> These should be gone in next already.
>>
>> Hmm, which next?
>>
>> I tried linux-next [1] from today (next-20120803, 55fa9961f) and still get
> next-20120725 contained 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17, don't
> konw why it isn't included in the newer next snapshorts.

It seems to be in -next again:

http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=98d7bbb9929bcc14e11ac8a55245a4f2dc174e17

I'm not so familiar with -next: Do we have any chance to get that 
commit into 3.6-rcX to get this warning fixed for the final 3.6?

Best regards

Dirk
Uwe Kleine-König - Aug. 18, 2012, 11:43 a.m.
Hi Dirk,

On Sat, Aug 18, 2012 at 11:58:33AM +0200, Dirk Behme wrote:
> On 05.08.2012 10:39, Uwe Kleine-König wrote:
> >On Sat, Aug 04, 2012 at 05:47:17PM +0200, Dirk Behme wrote:
> >>On 30.07.2012 09:34, Uwe Kleine-König wrote:
> >>>Hello,
> >>>
> >>>On Sat, Jul 28, 2012 at 11:05:10AM +0200, Dirk Behme wrote:
> >>>>From: Dirk Behme<dirk.behme@googlemail.com>
> >>>>
> >>>>Fix the compiler warnings
> >>>>
> >>>>drivers/mtd/nand/mxc_nand.c:1267: warning: initialization discards qualifiers from pointer target type
> >>>>drivers/mtd/nand/mxc_nand.c:1270: warning: initialization discards qualifiers from pointer target type
> >>>>drivers/mtd/nand/mxc_nand.c:1273: warning: initialization discards qualifiers from pointer target type
> >>>>drivers/mtd/nand/mxc_nand.c:1276: warning: initialization discards qualifiers from pointer target type
> >>>These should be gone in next already.
> >>
> >>Hmm, which next?
> >>
> >>I tried linux-next [1] from today (next-20120803, 55fa9961f) and still get
> >next-20120725 contained 98d7bbb9929bcc14e11ac8a55245a4f2dc174e17, don't
> >konw why it isn't included in the newer next snapshorts.
> 
> It seems to be in -next again:
> 
> http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=commit;h=98d7bbb9929bcc14e11ac8a55245a4f2dc174e17
> 
> I'm not so familiar with -next: Do we have any chance to get that
> commit into 3.6-rcX to get this warning fixed for the final 3.6?
Arnd sent a pull request that Linus T. seems to have ignored so far.

Best regards
Uwe

Patch

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 6acc790..31b125a 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1264,16 +1264,16 @@  static const struct mxc_nand_devtype_data imx51_nand_devtype_data = {
 static const struct of_device_id mxcnd_dt_ids[] = {
 	{
 		.compatible = "fsl,imx21-nand",
-		.data = &imx21_nand_devtype_data,
+		.data = (void *)&imx21_nand_devtype_data,
 	}, {
 		.compatible = "fsl,imx27-nand",
-		.data = &imx27_nand_devtype_data,
+		.data = (void *)&imx27_nand_devtype_data,
 	}, {
 		.compatible = "fsl,imx25-nand",
-		.data = &imx25_nand_devtype_data,
+		.data = (void *)&imx25_nand_devtype_data,
 	}, {
 		.compatible = "fsl,imx51-nand",
-		.data = &imx51_nand_devtype_data,
+		.data = (void *)&imx51_nand_devtype_data,
 	},
 	{ /* sentinel */ }
 };