Under a minimalist configuration, it is possible for i915 to include
vgaarb.h without including any pci header before hand. Silence the
compiler by providing an opaque forward declaration of 'struct pci_dev'

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]

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 include/linux/vgaarb.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..ddfb941 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,6 +31,7 @@
 #ifndef LINUX_VGA_H
 #define LINUX_VGA_H

+struct pci_dev;

 /* Legacy VGA regions */
 #define VGA_RSRC_NONE         0x00
-- 
1.7.9.1

Reply via email to