2009-07-13 07:27:02

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: driver-core tree build warning

Hi Greg,

Today's linux-next build (x86_64 allmodconfig) produced this warning:

drivers/firewire/core-device.c: In function 'init_fw_attribute_group':
drivers/firewire/core-device.c:315: warning: assignment from incompatible pointer type

Introduced by commit 025a6a26b70e5dc12ab9333ea43d70c735f459ac ("driver
model: constify attribute groups").

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (451.00 B)
(No filename) (197.00 B)
Download all attachments

2009-07-13 07:28:41

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

Hi Greg,

On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <[email protected]> wrote:
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> drivers/firewire/core-device.c: In function 'init_fw_attribute_group':
> drivers/firewire/core-device.c:315: warning: assignment from incompatible pointer type
>
> Introduced by commit 025a6a26b70e5dc12ab9333ea43d70c735f459ac ("driver
> model: constify attribute groups").

Also:

drivers/mtd/mtdcore.c:227: warning: initialization from incompatible pointer type

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (639.00 B)
(No filename) (197.00 B)
Download all attachments

2009-07-13 07:51:15

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

Hi Greg,

On Mon, 13 Jul 2009 17:28:31 +1000 Stephen Rothwell <[email protected]> wrote:
>
> On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <[email protected]> wrote:
> >
> > Today's linux-next build (x86_64 allmodconfig) produced this warning:
> >
> > drivers/firewire/core-device.c: In function 'init_fw_attribute_group':
> > drivers/firewire/core-device.c:315: warning: assignment from incompatible pointer type
> >
> > Introduced by commit 025a6a26b70e5dc12ab9333ea43d70c735f459ac ("driver
> > model: constify attribute groups").
>
> Also:
>
> drivers/mtd/mtdcore.c:227: warning: initialization from incompatible pointer type

And from a PowerPC allyesconfig build:

drivers/block/cciss.c:582: warning: initialization from incompatible pointer type

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (872.00 B)
(No filename) (197.00 B)
Download all attachments

2009-07-13 17:23:32

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

On Mon, Jul 13, 2009 at 05:51:06PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> On Mon, 13 Jul 2009 17:28:31 +1000 Stephen Rothwell <[email protected]> wrote:
> >
> > On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <[email protected]> wrote:
> > >
> > > Today's linux-next build (x86_64 allmodconfig) produced this warning:
> > >
> > > drivers/firewire/core-device.c: In function 'init_fw_attribute_group':
> > > drivers/firewire/core-device.c:315: warning: assignment from incompatible pointer type
> > >
> > > Introduced by commit 025a6a26b70e5dc12ab9333ea43d70c735f459ac ("driver
> > > model: constify attribute groups").
> >
> > Also:
> >
> > drivers/mtd/mtdcore.c:227: warning: initialization from incompatible pointer type
>
> And from a PowerPC allyesconfig build:
>
> drivers/block/cciss.c:582: warning: initialization from incompatible pointer type

David, care to send patches fixing these warnings?

thanks,

greg k-h

2009-07-13 21:24:05

by David Brownell

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

On Monday 13 July 2009, Greg KH wrote:
> David, care to send patches fixing these warnings?

Here's a single patch:

=================== CUT HERE
From: David Brownell <[email protected]>

Some more attribute group pointers need to become const-friendly:

drivers/firewire/core-device.c:315: warning: assignment from incompatible pointer type
drivers/mtd/mtdcore.c:227: warning: initialization from incompatible pointer type
drivers/block/cciss.c:582: warning: initialization from incompatible pointer type

Two of these post-date the original constification patch; not sure
how I missed Firewire the first time.

Signed-off-by: David Brownell <[email protected]>
---
drivers/block/cciss.c | 2 +-
drivers/firewire/core-device.c | 2 +-
drivers/mtd/mtdcore.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -572,7 +572,7 @@ static struct attribute_group cciss_dev_
.attrs = cciss_dev_attrs,
};

-static struct attribute_group *cciss_dev_attr_groups[] = {
+static const struct attribute_group *cciss_dev_attr_groups[] = {
&cciss_dev_attr_group,
NULL
};
--- a/drivers/firewire/core-device.c
+++ b/drivers/firewire/core-device.c
@@ -312,7 +312,7 @@ static void init_fw_attribute_group(stru
group->groups[0] = &group->group;
group->groups[1] = NULL;
group->group.attrs = group->attrs;
- dev->groups = group->groups;
+ dev->groups = (const struct attribute_group **) group->groups;
}

static ssize_t modalias_show(struct device *dev,
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -217,7 +217,7 @@ struct attribute_group mtd_group = {
.attrs = mtd_attrs,
};

-struct attribute_group *mtd_groups[] = {
+struct const attribute_group *mtd_groups[] = {
&mtd_group,
NULL,
};

2009-07-13 21:35:29

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

On Mon, Jul 13, 2009 at 02:23:59PM -0700, David Brownell wrote:
> On Monday 13 July 2009, Greg KH wrote:
> > David, care to send patches fixing these warnings?
>
> Here's a single patch:

Thanks, I'll merge this with the original one.

greg k-h

2009-07-13 23:25:07

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

On Mon, Jul 13, 2009 at 02:23:59PM -0700, David Brownell wrote:
> On Monday 13 July 2009, Greg KH wrote:
> > David, care to send patches fixing these warnings?
>
> Here's a single patch:

Now merged and pushed out. Stephen, this should be now resolved in your
builds for the next -next tree.

thanks,

greg k-h

2009-07-14 00:44:48

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: driver-core tree build warning

On Mon, 13 Jul 2009 14:36:14 -0700 Greg KH <[email protected]> wrote:
>
> On Mon, Jul 13, 2009 at 02:23:59PM -0700, David Brownell wrote:
> > On Monday 13 July 2009, Greg KH wrote:
> > > David, care to send patches fixing these warnings?
> >
> > Here's a single patch:
>
> Now merged and pushed out. Stephen, this should be now resolved in your
> builds for the next -next tree.

Thanks all.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (496.00 B)
(No filename) (197.00 B)
Download all attachments