From: Randy Dunlap <rdunlap@xenotime.net>
To: Meelis Roos <mroos@linux.ee>
Cc: Clemens Ladisch <clemens@ladisch.de>,
Dave Airlie <airlied@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fix warnings from vgaarb.h
Date: Wed, 04 Apr 2012 07:46:18 -0700 [thread overview]
Message-ID: <4F7C5EBA.3010506@xenotime.net> (raw)
In-Reply-To: <alpine.SOC.1.00.1204040947170.26551@math.ut.ee>
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.
prev parent reply other threads:[~2012-04-04 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=4F7C5EBA.3010506@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=airlied@redhat.com \
--cc=benh@kernel.crashing.org \
--cc=clemens@ladisch.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mroos@linux.ee \
/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