* linux-next: driver-core tree build warning
@ 2009-07-13 7:26 Stephen Rothwell
2009-07-13 7:28 ` Stephen Rothwell
0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2009-07-13 7:26 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, David Brownell
[-- Attachment #1: Type: text/plain, Size: 465 bytes --]
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 sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: linux-next: driver-core tree build warning 2009-07-13 7:26 linux-next: driver-core tree build warning Stephen Rothwell @ 2009-07-13 7:28 ` Stephen Rothwell 2009-07-13 7:51 ` Stephen Rothwell 0 siblings, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2009-07-13 7:28 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, David Brownell [-- Attachment #1: Type: text/plain, Size: 659 bytes --] Hi Greg, On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> 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 sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 7:28 ` Stephen Rothwell @ 2009-07-13 7:51 ` Stephen Rothwell 2009-07-13 17:18 ` Greg KH 0 siblings, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2009-07-13 7:51 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, David Brownell [-- Attachment #1: Type: text/plain, Size: 898 bytes --] Hi Greg, On Mon, 13 Jul 2009 17:28:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> 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 sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 7:51 ` Stephen Rothwell @ 2009-07-13 17:18 ` Greg KH 2009-07-13 21:23 ` David Brownell 0 siblings, 1 reply; 19+ messages in thread From: Greg KH @ 2009-07-13 17:18 UTC (permalink / raw) To: Stephen Rothwell, David Brownell; +Cc: linux-next, linux-kernel 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 <sfr@canb.auug.org.au> wrote: > > > > On Mon, 13 Jul 2009 17:26:46 +1000 Stephen Rothwell <sfr@canb.auug.org.au> 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 ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 17:18 ` Greg KH @ 2009-07-13 21:23 ` David Brownell 2009-07-13 21:27 ` Greg KH 2009-07-13 21:36 ` Greg KH 0 siblings, 2 replies; 19+ messages in thread From: David Brownell @ 2009-07-13 21:23 UTC (permalink / raw) To: Greg KH; +Cc: Stephen Rothwell, linux-next, linux-kernel 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 <dbrownell@users.sourceforge.net> 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 <dbrownell@users.sourceforge.net> --- 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, }; ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 21:23 ` David Brownell @ 2009-07-13 21:27 ` Greg KH 2009-07-13 21:36 ` Greg KH 1 sibling, 0 replies; 19+ messages in thread From: Greg KH @ 2009-07-13 21:27 UTC (permalink / raw) To: David Brownell; +Cc: Stephen Rothwell, linux-next, linux-kernel 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 ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 21:23 ` David Brownell 2009-07-13 21:27 ` Greg KH @ 2009-07-13 21:36 ` Greg KH 2009-07-14 0:44 ` Stephen Rothwell 1 sibling, 1 reply; 19+ messages in thread From: Greg KH @ 2009-07-13 21:36 UTC (permalink / raw) To: David Brownell; +Cc: Stephen Rothwell, linux-next, linux-kernel 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 ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2009-07-13 21:36 ` Greg KH @ 2009-07-14 0:44 ` Stephen Rothwell 0 siblings, 0 replies; 19+ messages in thread From: Stephen Rothwell @ 2009-07-14 0:44 UTC (permalink / raw) To: Greg KH; +Cc: David Brownell, linux-next, linux-kernel [-- Attachment #1: Type: text/plain, Size: 513 bytes --] On Mon, 13 Jul 2009 14:36:14 -0700 Greg KH <greg@kroah.com> 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 sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* linux-next: driver-core tree build warning
@ 2010-01-19 6:27 Stephen Rothwell
2010-01-19 21:04 ` Greg KH
0 siblings, 1 reply; 19+ messages in thread
From: Stephen Rothwell @ 2010-01-19 6:27 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
Hi Greg,
Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
drivers/base/cpu.c:264: warning: initialization from incompatible pointer type
drivers/base/cpu.c:265: warning: initialization from incompatible pointer type
Introduced by commit 380567d3dc35a62f5cc0ec640a45dfc238238417 ("sysdev:
Convert node driver")?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: linux-next: driver-core tree build warning 2010-01-19 6:27 Stephen Rothwell @ 2010-01-19 21:04 ` Greg KH 2010-01-19 23:45 ` Stephen Rothwell 0 siblings, 1 reply; 19+ messages in thread From: Greg KH @ 2010-01-19 21:04 UTC (permalink / raw) To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Andi Kleen On Tue, Jan 19, 2010 at 05:27:41PM +1100, Stephen Rothwell wrote: > Hi Greg, > > Today's linux-next build (powerpc ppc64_defconfig) produced this warning: > > drivers/base/cpu.c:264: warning: initialization from incompatible pointer type > drivers/base/cpu.c:265: warning: initialization from incompatible pointer type > > Introduced by commit 380567d3dc35a62f5cc0ec640a45dfc238238417 ("sysdev: > Convert node driver")? No, I don't think that patch causes the warning, I can't duplicate it here. I don't know what patch causes that problem, as I can't duplicate it in my tree at all. Maybe some 'const' patch snuck in from some other tree? strange, greg k-h ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-19 21:04 ` Greg KH @ 2010-01-19 23:45 ` Stephen Rothwell 2010-01-20 6:25 ` Stephen Rothwell 0 siblings, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2010-01-19 23:45 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 957 bytes --] Hi Greg, On Tue, 19 Jan 2010 13:04:17 -0800 Greg KH <greg@kroah.com> wrote: > > On Tue, Jan 19, 2010 at 05:27:41PM +1100, Stephen Rothwell wrote: > > Hi Greg, > > > > Today's linux-next build (powerpc ppc64_defconfig) produced this warning: > > > > drivers/base/cpu.c:264: warning: initialization from incompatible pointer type > > drivers/base/cpu.c:265: warning: initialization from incompatible pointer type > > > > Introduced by commit 380567d3dc35a62f5cc0ec640a45dfc238238417 ("sysdev: > > Convert node driver")? > > No, I don't think that patch causes the warning, I can't duplicate it > here. > > I don't know what patch causes that problem, as I can't duplicate it in > my tree at all. Maybe some 'const' patch snuck in from some other tree? > > strange, OK, if it is still there today, I will look deeper. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-19 23:45 ` Stephen Rothwell @ 2010-01-20 6:25 ` Stephen Rothwell 2010-01-20 6:44 ` Stephen Rothwell 0 siblings, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2010-01-20 6:25 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 1662 bytes --] Hi Greg, On Wed, 20 Jan 2010 10:45:25 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > On Tue, 19 Jan 2010 13:04:17 -0800 Greg KH <greg@kroah.com> wrote: > > > > On Tue, Jan 19, 2010 at 05:27:41PM +1100, Stephen Rothwell wrote: > > > > > > Today's linux-next build (powerpc ppc64_defconfig) produced this warning: > > > > > > drivers/base/cpu.c:264: warning: initialization from incompatible pointer type > > > drivers/base/cpu.c:265: warning: initialization from incompatible pointer type > > > > > > Introduced by commit 380567d3dc35a62f5cc0ec640a45dfc238238417 ("sysdev: > > > Convert node driver")? > > > > No, I don't think that patch causes the warning, I can't duplicate it > > here. > > > > I don't know what patch causes that problem, as I can't duplicate it in > > my tree at all. Maybe some 'const' patch snuck in from some other tree? > > > > strange, > > OK, if it is still there today, I will look deeper. I still get those warnings. The two referenced lines are added by the commit above. The relevant parts of the file (in the version I have) are: (lines 98 and 99) static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store); ... (lines 262-266) static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE &class_attr_probe.attr, &class_attr_release.attr, #endif class_attr_probe.attr is a "struct attribute" not a "struct sysdev_class_attribute". -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-20 6:25 ` Stephen Rothwell @ 2010-01-20 6:44 ` Stephen Rothwell 2010-01-21 23:10 ` Greg KH 0 siblings, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2010-01-20 6:44 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 565 bytes --] Hi Greg, On Wed, 20 Jan 2010 17:25:43 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > (lines 262-266) > static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { > #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE > &class_attr_probe.attr, > &class_attr_release.attr, > #endif The reason you may not see this is because CONFIG_ARCH_CPU_PROBE_RELEASE is not set for x86_64 allmodconfig builds (and probably many others). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-20 6:44 ` Stephen Rothwell @ 2010-01-21 23:10 ` Greg KH 2010-01-21 23:20 ` Stephen Rothwell 2010-01-29 7:21 ` Stephen Rothwell 0 siblings, 2 replies; 19+ messages in thread From: Greg KH @ 2010-01-21 23:10 UTC (permalink / raw) To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Andi Kleen On Wed, Jan 20, 2010 at 05:44:41PM +1100, Stephen Rothwell wrote: > Hi Greg, > > On Wed, 20 Jan 2010 17:25:43 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > (lines 262-266) > > static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { > > #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE > > &class_attr_probe.attr, > > &class_attr_release.attr, > > #endif > > The reason you may not see this is because CONFIG_ARCH_CPU_PROBE_RELEASE > is not set for x86_64 allmodconfig builds (and probably many others). Ah, you are right, I was focusing on the lines after this. Here's a patch that I just applied to my tree to hopefully resolve this issue. thanks, greg k-h ---------- From: Greg Kroah-Hartman <gregkh@suse.de> Subject: sysdev: fix up the probe/release attributes These should be sysdev attributes, not class attributes. This patch should resolve the problem. Thanks to Stephen Rothwell for pointing out the problem. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/base/cpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -79,24 +79,24 @@ void unregister_cpu(struct cpu *cpu) } #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE -static ssize_t cpu_probe_store(struct class *class, - struct class_attribute *attr, +static ssize_t cpu_probe_store(struct sys_device *dev, + struct sysdev_attribute *attr, const char *buf, size_t count) { return arch_cpu_probe(buf, count); } -static ssize_t cpu_release_store(struct class *class, - struct class_attribute *attr, +static ssize_t cpu_release_store(struct sys_device *dev, + struct sysdev_attribute *attr, const char *buf, size_t count) { return arch_cpu_release(buf, count); } -static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); -static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store); +static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); +static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store); #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ #else /* ... !CONFIG_HOTPLUG_CPU */ @@ -261,8 +261,8 @@ int __init cpu_dev_init(void) static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE - &class_attr_probe.attr, - &class_attr_release.attr, + &attr_probe.attr, + &attr_release.attr, #endif &cpu_attrs[0].attr, &cpu_attrs[1].attr, ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-21 23:10 ` Greg KH @ 2010-01-21 23:20 ` Stephen Rothwell 2010-01-29 7:21 ` Stephen Rothwell 1 sibling, 0 replies; 19+ messages in thread From: Stephen Rothwell @ 2010-01-21 23:20 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 354 bytes --] Hi Greg, On Thu, 21 Jan 2010 15:10:10 -0800 Greg KH <greg@kroah.com> wrote: > > Ah, you are right, I was focusing on the lines after this. > > Here's a patch that I just applied to my tree to hopefully resolve this > issue. Thanks. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-21 23:10 ` Greg KH 2010-01-21 23:20 ` Stephen Rothwell @ 2010-01-29 7:21 ` Stephen Rothwell 2010-02-03 2:22 ` Greg KH 1 sibling, 1 reply; 19+ messages in thread From: Stephen Rothwell @ 2010-01-29 7:21 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 1159 bytes --] Hi Greg, On Thu, 21 Jan 2010 15:10:10 -0800 Greg KH <greg@kroah.com> wrote: > > Here's a patch that I just applied to my tree to hopefully resolve this > issue. I still get the warnings. > -static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); > -static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store); > +static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); This defines attr_probe as a "struct sysdev_attribute" whose attr element is a "struct attribute". > +static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store); > #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ > > #else /* ... !CONFIG_HOTPLUG_CPU */ > @@ -261,8 +261,8 @@ int __init cpu_dev_init(void) > > static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { > #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE > - &class_attr_probe.attr, > - &class_attr_release.attr, > + &attr_probe.attr, so here we are initialising a "struct sysdev_class_attribute *" with a "struct attribute *". Thus the warning. > + &attr_release.attr, -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-01-29 7:21 ` Stephen Rothwell @ 2010-02-03 2:22 ` Greg KH 2010-02-03 3:29 ` Stephen Rothwell 2010-02-04 7:10 ` Stephen Rothwell 0 siblings, 2 replies; 19+ messages in thread From: Greg KH @ 2010-02-03 2:22 UTC (permalink / raw) To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Andi Kleen On Fri, Jan 29, 2010 at 06:21:15PM +1100, Stephen Rothwell wrote: > Hi Greg, > > On Thu, 21 Jan 2010 15:10:10 -0800 Greg KH <greg@kroah.com> wrote: > > > > Here's a patch that I just applied to my tree to hopefully resolve this > > issue. > > I still get the warnings. > > > -static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); > > -static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store); > > +static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); > > This defines attr_probe as a "struct sysdev_attribute" whose attr element > is a "struct attribute". > > > +static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store); > > #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ > > > > #else /* ... !CONFIG_HOTPLUG_CPU */ > > @@ -261,8 +261,8 @@ int __init cpu_dev_init(void) > > > > static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { > > #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE > > - &class_attr_probe.attr, > > - &class_attr_release.attr, > > + &attr_probe.attr, > > so here we are initialising a "struct sysdev_class_attribute *" with a > "struct attribute *". Thus the warning. Doh, sorry about that. I've fixed it up now and pushed it out. thanks, greg k-h ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-02-03 2:22 ` Greg KH @ 2010-02-03 3:29 ` Stephen Rothwell 2010-02-04 7:10 ` Stephen Rothwell 1 sibling, 0 replies; 19+ messages in thread From: Stephen Rothwell @ 2010-02-03 3:29 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 276 bytes --] Hi Greg, On Tue, 2 Feb 2010 18:22:47 -0800 Greg KH <greg@kroah.com> wrote: > > Doh, sorry about that. I've fixed it up now and pushed it out. Great, thanks. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: linux-next: driver-core tree build warning 2010-02-03 2:22 ` Greg KH 2010-02-03 3:29 ` Stephen Rothwell @ 2010-02-04 7:10 ` Stephen Rothwell 1 sibling, 0 replies; 19+ messages in thread From: Stephen Rothwell @ 2010-02-04 7:10 UTC (permalink / raw) To: Greg KH; +Cc: linux-next, linux-kernel, Andi Kleen [-- Attachment #1: Type: text/plain, Size: 1414 bytes --] Hi Greg, On Tue, 2 Feb 2010 18:22:47 -0800 Greg KH <greg@kroah.com> wrote: > > On Fri, Jan 29, 2010 at 06:21:15PM +1100, Stephen Rothwell wrote: > > > > > -static CLASS_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); > > > -static CLASS_ATTR(release, S_IWUSR, NULL, cpu_release_store); > > > +static SYSDEV_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); > > > > This defines attr_probe as a "struct sysdev_attribute" whose attr element > > is a "struct attribute". > > > > > +static SYSDEV_ATTR(release, S_IWUSR, NULL, cpu_release_store); > > > #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ > > > > > > #else /* ... !CONFIG_HOTPLUG_CPU */ > > > @@ -261,8 +261,8 @@ int __init cpu_dev_init(void) > > > > > > static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = { > > > #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE > > > - &class_attr_probe.attr, > > > - &class_attr_release.attr, > > > + &attr_probe.attr, > > > > so here we are initialising a "struct sysdev_class_attribute *" with a > > "struct attribute *". Thus the warning. > > Doh, sorry about that. I've fixed it up now and pushed it out. Still not right :-( &attr_probe and &attr_release are "struct sysdev_attribute *" after this patch, but are being assigned to "struct sysdev_class_attribute *" ... -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2010-02-04 7:10 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-13 7:26 linux-next: driver-core tree build warning Stephen Rothwell 2009-07-13 7:28 ` Stephen Rothwell 2009-07-13 7:51 ` Stephen Rothwell 2009-07-13 17:18 ` Greg KH 2009-07-13 21:23 ` David Brownell 2009-07-13 21:27 ` Greg KH 2009-07-13 21:36 ` Greg KH 2009-07-14 0:44 ` Stephen Rothwell -- strict thread matches above, loose matches on Subject: below -- 2010-01-19 6:27 Stephen Rothwell 2010-01-19 21:04 ` Greg KH 2010-01-19 23:45 ` Stephen Rothwell 2010-01-20 6:25 ` Stephen Rothwell 2010-01-20 6:44 ` Stephen Rothwell 2010-01-21 23:10 ` Greg KH 2010-01-21 23:20 ` Stephen Rothwell 2010-01-29 7:21 ` Stephen Rothwell 2010-02-03 2:22 ` Greg KH 2010-02-03 3:29 ` Stephen Rothwell 2010-02-04 7:10 ` Stephen Rothwell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox