* linux-next: driver-core tree build warning
@ 2009-05-01 5:21 Stephen Rothwell
[not found] ` <20090501152144.500e619a.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2009-05-01 5:21 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, John W. Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]
Hi Greg,
Today's linux-next build (x86_64 allmodconfig) produced these warnings:
drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_cfg':
drivers/net/wireless/ipw2x00/ipw2100.c:3491: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_status':
drivers/net/wireless/ipw2x00/ipw2100.c:3500: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_capability':
drivers/net/wireless/ipw2x00/ipw2100.c:3509: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_rf_kill':
drivers/net/wireless/ipw2x00/ipw2100.c:4227: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
Introduced by commit 73119f5e60e3b16577e99e2f035039bed0d2dcca ("Wireless:
remove driver_data direct access of struct device").
--
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] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
[not found] ` <20090501152144.500e619a.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
@ 2009-05-01 5:47 ` Greg KH
2009-05-01 6:11 ` Greg KH
0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2009-05-01 5:47 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next-u79uwXL29TY76Z2rM5mHXA, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA
On Fri, May 01, 2009 at 03:21:44PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next build (x86_64 allmodconfig) produced these warnings:
>
> drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_cfg':
> drivers/net/wireless/ipw2x00/ipw2100.c:3491: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_status':
> drivers/net/wireless/ipw2x00/ipw2100.c:3500: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_capability':
> drivers/net/wireless/ipw2x00/ipw2100.c:3509: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_rf_kill':
> drivers/net/wireless/ipw2x00/ipw2100.c:4227: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
>
> Introduced by commit 73119f5e60e3b16577e99e2f035039bed0d2dcca ("Wireless:
> remove driver_data direct access of struct device").
Ah crap, my bad. I'll go fix this up, it passed my build tests, I
wonder why this isn't an error, I missed the warning.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2009-05-01 5:47 ` Greg KH
@ 2009-05-01 6:11 ` Greg KH
2009-05-01 7:11 ` Stephen Rothwell
0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2009-05-01 6:11 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, John W. Linville, linux-wireless
On Thu, Apr 30, 2009 at 10:47:27PM -0700, Greg KH wrote:
> On Fri, May 01, 2009 at 03:21:44PM +1000, Stephen Rothwell wrote:
> > Hi Greg,
> >
> > Today's linux-next build (x86_64 allmodconfig) produced these warnings:
> >
> > drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_cfg':
> > drivers/net/wireless/ipw2x00/ipw2100.c:3491: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> > include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> > drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_status':
> > drivers/net/wireless/ipw2x00/ipw2100.c:3500: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> > include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> > drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_capability':
> > drivers/net/wireless/ipw2x00/ipw2100.c:3509: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> > include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> > drivers/net/wireless/ipw2x00/ipw2100.c: In function 'show_rf_kill':
> > drivers/net/wireless/ipw2x00/ipw2100.c:4227: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
> > include/linux/device.h:457: note: expected 'const struct device *' but argument is of type 'struct device **'
> >
> > Introduced by commit 73119f5e60e3b16577e99e2f035039bed0d2dcca ("Wireless:
> > remove driver_data direct access of struct device").
>
> Ah crap, my bad. I'll go fix this up, it passed my build tests, I
> wonder why this isn't an error, I missed the warning.
I've sent an updated version of the patch that fixes this to John and
the wireless mailing list and updated my tree as well.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2009-05-01 6:11 ` Greg KH
@ 2009-05-01 7:11 ` Stephen Rothwell
0 siblings, 0 replies; 27+ messages in thread
From: Stephen Rothwell @ 2009-05-01 7:11 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, John W. Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
Hi Greg,
On Thu, 30 Apr 2009 23:11:18 -0700 Greg KH <greg@kroah.com> wrote:
>
> On Thu, Apr 30, 2009 at 10:47:27PM -0700, Greg KH wrote:
> > Ah crap, my bad. I'll go fix this up, it passed my build tests, I
> > wonder why this isn't an error, I missed the warning.
I assume it is actually valid C (just not good C :-)).
> I've sent an updated version of the patch that fixes this to John and
> the wireless mailing list and updated my tree as well.
Thanks.
--
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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ 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; 27+ 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] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2009-07-13 7:26 Stephen Rothwell
@ 2009-07-13 7:28 ` Stephen Rothwell
2009-07-13 7:51 ` Stephen Rothwell
0 siblings, 1 reply; 27+ 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] 27+ messages in thread
* 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; 27+ 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] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2008-08-18 19:09 ` Jason Baron
@ 2008-08-18 22:35 ` Greg KH
0 siblings, 0 replies; 27+ messages in thread
From: Greg KH @ 2008-08-18 22:35 UTC (permalink / raw)
To: Jason Baron; +Cc: Stephen Rothwell, linux-next
On Mon, Aug 18, 2008 at 03:09:47PM -0400, Jason Baron wrote:
> On Fri, Aug 15, 2008 at 10:34:32PM -0700, Greg KH wrote:
> > > Hi Greg,
> > >
> > > Today's linux-next build (x86_64 allmodconfig) produced this warning:
> > >
> > > In file included from include2/asm/string.h:4,
> > > from include/linux/string.h:19,
> > > from include/linux/dynamic_printk.h:4,
> > > from include/linux/kernel.h:19,
> > > from arch/x86/boot/memory.c:16:
> > > include2/asm/string_64.h:34:1: warning: "memcpy" redefined
> > > In file included from /scratch/sfr/next/arch/x86/boot/memory.c:15:
> > > arch/x86/boot/boot.h:231:1: warning: this is the location of the previous definition
> > >
> > > Probably caused by commit 1b75321c2d0561d9ecfe3794fa939264f3eb7e26
> > > ("driver core: basic infrastructure for per-module dynamic debug
> > > messages") which added an include of linux/dynamic_printk.h to
> > > linux/kernel.h.
> >
> > Wierd. Jason, any thoughts?
> >
> > thanks,
> >
> > greg k-h
>
> hmm...i wasn't actually able to reproduce this (gcc 4.3.0-8), but I think I see
> how this comes about. Anyways, we don't actually need to include "string.h",
> its a remnant from an earlier version. The following patch should resolve this
> issue.
Thanks, I've merged this with the original one.
greg k-h
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2008-08-16 5:34 ` Greg KH
@ 2008-08-18 19:09 ` Jason Baron
2008-08-18 22:35 ` Greg KH
0 siblings, 1 reply; 27+ messages in thread
From: Jason Baron @ 2008-08-18 19:09 UTC (permalink / raw)
To: Greg KH; +Cc: Stephen Rothwell, linux-next
On Fri, Aug 15, 2008 at 10:34:32PM -0700, Greg KH wrote:
> > Hi Greg,
> >
> > Today's linux-next build (x86_64 allmodconfig) produced this warning:
> >
> > In file included from include2/asm/string.h:4,
> > from include/linux/string.h:19,
> > from include/linux/dynamic_printk.h:4,
> > from include/linux/kernel.h:19,
> > from arch/x86/boot/memory.c:16:
> > include2/asm/string_64.h:34:1: warning: "memcpy" redefined
> > In file included from /scratch/sfr/next/arch/x86/boot/memory.c:15:
> > arch/x86/boot/boot.h:231:1: warning: this is the location of the previous definition
> >
> > Probably caused by commit 1b75321c2d0561d9ecfe3794fa939264f3eb7e26
> > ("driver core: basic infrastructure for per-module dynamic debug
> > messages") which added an include of linux/dynamic_printk.h to
> > linux/kernel.h.
>
> Wierd. Jason, any thoughts?
>
> thanks,
>
> greg k-h
hmm...i wasn't actually able to reproduce this (gcc 4.3.0-8), but I think I see
how this comes about. Anyways, we don't actually need to include "string.h",
its a remnant from an earlier version. The following patch should resolve this
issue.
thanks,
-Jason
Signed-off-by: Jason Baron <jbaron@redhat.com>
---
diff --git a/include/linux/dynamic_printk.h b/include/linux/dynamic_printk.h
index 210bf61..c54cf84 100644
--- a/include/linux/dynamic_printk.h
+++ b/include/linux/dynamic_printk.h
@@ -1,9 +1,6 @@
#ifndef _DYNAMIC_PRINTK_H
#define _DYNAMIC_PRINTK_H
-#include <linux/string.h>
-#include <linux/hash.h>
-
#define DYNAMIC_DEBUG_HASH_BITS 6
#define DEBUG_HASH_TABLE_SIZE (1 << DYNAMIC_DEBUG_HASH_BITS)
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: linux-next: driver-core tree build warning
2008-08-15 2:59 Stephen Rothwell
@ 2008-08-16 5:34 ` Greg KH
2008-08-18 19:09 ` Jason Baron
0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2008-08-16 5:34 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, Jason Baron
On Fri, Aug 15, 2008 at 12:59:57PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> In file included from include2/asm/string.h:4,
> from include/linux/string.h:19,
> from include/linux/dynamic_printk.h:4,
> from include/linux/kernel.h:19,
> from arch/x86/boot/memory.c:16:
> include2/asm/string_64.h:34:1: warning: "memcpy" redefined
> In file included from /scratch/sfr/next/arch/x86/boot/memory.c:15:
> arch/x86/boot/boot.h:231:1: warning: this is the location of the previous definition
>
> Probably caused by commit 1b75321c2d0561d9ecfe3794fa939264f3eb7e26
> ("driver core: basic infrastructure for per-module dynamic debug
> messages") which added an include of linux/dynamic_printk.h to
> linux/kernel.h.
Wierd. Jason, any thoughts?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 27+ messages in thread
* linux-next: driver-core tree build warning
@ 2008-08-15 2:59 Stephen Rothwell
2008-08-16 5:34 ` Greg KH
0 siblings, 1 reply; 27+ messages in thread
From: Stephen Rothwell @ 2008-08-15 2:59 UTC (permalink / raw)
To: Greg KH; +Cc: linux-next, Jason Baron
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
Hi Greg,
Today's linux-next build (x86_64 allmodconfig) produced this warning:
In file included from include2/asm/string.h:4,
from include/linux/string.h:19,
from include/linux/dynamic_printk.h:4,
from include/linux/kernel.h:19,
from arch/x86/boot/memory.c:16:
include2/asm/string_64.h:34:1: warning: "memcpy" redefined
In file included from /scratch/sfr/next/arch/x86/boot/memory.c:15:
arch/x86/boot/boot.h:231:1: warning: this is the location of the previous definition
Probably caused by commit 1b75321c2d0561d9ecfe3794fa939264f3eb7e26
("driver core: basic infrastructure for per-module dynamic debug
messages") which added an include of linux/dynamic_printk.h to
linux/kernel.h.
--
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] 27+ messages in thread
end of thread, other threads:[~2010-02-04 7:10 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-01 5:21 linux-next: driver-core tree build warning Stephen Rothwell
[not found] ` <20090501152144.500e619a.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2009-05-01 5:47 ` Greg KH
2009-05-01 6:11 ` Greg KH
2009-05-01 7:11 ` 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
2009-07-13 7:26 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
2008-08-15 2:59 Stephen Rothwell
2008-08-16 5:34 ` Greg KH
2008-08-18 19:09 ` Jason Baron
2008-08-18 22:35 ` Greg KH
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).