mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Meelis Roos <mroos@linux.ee>
To: Dave Airlie <airlied@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix warnings from vgaarb.h
Date: Wed, 4 Apr 2012 09:20:26 +0300 (EEST)	[thread overview]
Message-ID: <alpine.SOC.1.00.1204040912210.26551@math.ut.ee> (raw)

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)

             reply	other threads:[~2012-04-04  6:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04  6:20 Meelis Roos [this message]
2012-04-04  6:47 ` Clemens Ladisch
2012-04-04  7:00   ` Meelis Roos
2012-04-04 14:46     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.SOC.1.00.1204040912210.26551@math.ut.ee \
    --to=mroos@linux.ee \
    --cc=airlied@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome