* [PATCH] fix warnings from vgaarb.h
@ 2012-04-04 6:20 Meelis Roos
2012-04-04 6:47 ` Clemens Ladisch
0 siblings, 1 reply; 4+ messages in thread
From: Meelis Roos @ 2012-04-04 6:20 UTC (permalink / raw)
To: Dave Airlie, Benjamin Herrenschmidt; +Cc: Linux Kernel list
in 3.4-rc1-144, I get the following warnings. Fix them by including
<linux/pci.h> to get struct pci_dev.
CC [M] drivers/gpu/drm/i915/intel_display.o
In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:66:9: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
include/linux/vgaarb.h:97:27: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:109:6: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/vgaarb.h: In function ‘vga_get_interruptible’:
include/linux/vgaarb.h:111:8: warning: passing argument 1 of ‘vga_get’ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:97:12: note: expected ‘struct pci_dev *’ but argument is of type ‘struct pci_dev *’
include/linux/vgaarb.h: At top level:
include/linux/vgaarb.h:121:8: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/vgaarb.h: In function ‘vga_get_uninterruptible’:
include/linux/vgaarb.h:123:8: warning: passing argument 1 of ‘vga_get’ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:97:12: note: expected ‘struct pci_dev *’ but argument is of type ‘struct pci_dev *’
include/linux/vgaarb.h: At top level:
include/linux/vgaarb.h:138:30: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
include/linux/vgaarb.h:157:28: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
drivers/gpu/drm/i915/intel_display.c: In function ‘i915_disable_vga’:
drivers/gpu/drm/i915/intel_display.c:9127:2: warning: passing argument 1 of ‘vga_get_uninterruptible’ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:120:19: note: expected ‘struct pci_dev *’ but argument is of type ‘struct pci_dev *’
drivers/gpu/drm/i915/intel_display.c:9131:2: warning: passing argument 1 of ‘vga_put’ from incompatible pointer type [enabled by default]
include/linux/vgaarb.h:157:13: note: expected ‘struct pci_dev *’ but argument is of type ‘struct pci_dev *’
Signed-off-by: Meelis Roos <mroos@linux.ee>
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..c23ba57 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,6 +31,7 @@
#ifndef LINUX_VGA_H
#define LINUX_VGA_H
+#include <linux/pci.h>
/* Legacy VGA regions */
#define VGA_RSRC_NONE 0x00
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings from vgaarb.h
2012-04-04 6:20 [PATCH] fix warnings from vgaarb.h Meelis Roos
@ 2012-04-04 6:47 ` Clemens Ladisch
2012-04-04 7:00 ` Meelis Roos
0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2012-04-04 6:47 UTC (permalink / raw)
To: Meelis Roos; +Cc: Dave Airlie, Benjamin Herrenschmidt, Linux Kernel list
Meelis Roos wrote:
> in 3.4-rc1-144, I get the following warnings. Fix them by including
> <linux/pci.h> to get struct pci_dev.
>
> CC [M] drivers/gpu/drm/i915/intel_display.o
> In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
> include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
Or you could simply declare it:
struct pci_dev;
Regards,
Clemens
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings from vgaarb.h
2012-04-04 6:47 ` Clemens Ladisch
@ 2012-04-04 7:00 ` Meelis Roos
2012-04-04 14:46 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Meelis Roos @ 2012-04-04 7:00 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: Dave Airlie, Benjamin Herrenschmidt, Linux Kernel list
> Meelis Roos wrote:
> > in 3.4-rc1-144, I get the following warnings. Fix them by including
> > <linux/pci.h> to get struct pci_dev.
> >
> > CC [M] drivers/gpu/drm/i915/intel_display.o
> > In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
> > include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
>
> Or you could simply declare it:
>
> struct pci_dev;
Right, but any actual user of vgaarb would still need real pci_dev
anyway. But yes, nothing in vgaarb.h uses pci_dev contents, so the
following also compiles without warnings:
-
in 3.4-rc1-144, I get several warnings like this
CC [M] drivers/gpu/drm/i915/intel_display.o
In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
Fix them by forward declaring struct pci_dev:
Signed-off-by: Meelis Roos <mroos@linux.ee>
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..b572f80 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -47,6 +47,8 @@
*/
#define VGA_DEFAULT_DEVICE (NULL)
+struct pci_dev;
+
/* For use by clients */
/**
'
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fix warnings from vgaarb.h
2012-04-04 7:00 ` Meelis Roos
@ 2012-04-04 14:46 ` Randy Dunlap
0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2012-04-04 14:46 UTC (permalink / raw)
To: Meelis Roos
Cc: Clemens Ladisch, Dave Airlie, Benjamin Herrenschmidt,
Linux Kernel list
On 04/04/2012 12:00 AM, Meelis Roos wrote:
>> Meelis Roos wrote:
>>> in 3.4-rc1-144, I get the following warnings. Fix them by including
>>> <linux/pci.h> to get struct pci_dev.
>>>
>>> CC [M] drivers/gpu/drm/i915/intel_display.o
>>> In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
>>> include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
>>
>> Or you could simply declare it:
>>
>> struct pci_dev;
>
> Right, but any actual user of vgaarb would still need real pci_dev
> anyway. But yes, nothing in vgaarb.h uses pci_dev contents, so the
> following also compiles without warnings:
>
> -
>
> in 3.4-rc1-144, I get several warnings like this
>
> CC [M] drivers/gpu/drm/i915/intel_display.o
> In file included from drivers/gpu/drm/i915/intel_display.c:33:0:
> include/linux/vgaarb.h:66:9: warning: ‘struct pci_dev’ declared inside parameter list [enabled by default]
>
> Fix them by forward declaring struct pci_dev:
>
> Signed-off-by: Meelis Roos<mroos@linux.ee>
>
> diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
> index 9c3120d..b572f80 100644
> --- a/include/linux/vgaarb.h
> +++ b/include/linux/vgaarb.h
> @@ -47,6 +47,8 @@
> */
> #define VGA_DEFAULT_DEVICE (NULL)
>
> +struct pci_dev;
> +
> /* For use by clients */
>
> /**
> '
>
Yes, I have sent this same patch at least 2 times, beginning on
Jan-30-2012. And I cc-ed dri-devel mailing list and Dave Airlie
on it also.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-04 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 6:20 [PATCH] fix warnings from vgaarb.h Meelis Roos
2012-04-04 6:47 ` Clemens Ladisch
2012-04-04 7:00 ` Meelis Roos
2012-04-04 14:46 ` Randy Dunlap
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.