linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/AER: Make linux/aer.h standalone includable
@ 2014-08-05 12:08 Thierry Reding
  2014-09-04 21:58 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-08-05 12:08 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, linux-kernel

From: Thierry Reding <treding@nvidia.com>

The header file references u16, u32 and struct pci_dev types, but they
are not defined in the header nor does the header pull in the necessary
includes for them. This causes build breakage when the file is included
without any of the dependencies being satisfied from somewhere else.

Fix this by including linux/types.h (for u16 and u32) and by adding a
forward-declaration of struct pci_dev.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/linux/aer.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/aer.h b/include/linux/aer.h
index 4dbaa7081530..04bcf33a3e3a 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -7,6 +7,10 @@
 #ifndef _AER_H_
 #define _AER_H_
 
+#include <linux/types.h>
+
+struct pci_dev;
+
 #define AER_NONFATAL			0
 #define AER_FATAL			1
 #define AER_CORRECTABLE			2
-- 
2.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI/AER: Make linux/aer.h standalone includable
  2014-08-05 12:08 [PATCH] PCI/AER: Make linux/aer.h standalone includable Thierry Reding
@ 2014-09-04 21:58 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2014-09-04 21:58 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-pci, linux-kernel

On Tue, Aug 05, 2014 at 02:08:55PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The header file references u16, u32 and struct pci_dev types, but they
> are not defined in the header nor does the header pull in the necessary
> includes for them. This causes build breakage when the file is included
> without any of the dependencies being satisfied from somewhere else.
> 
> Fix this by including linux/types.h (for u16 and u32) and by adding a
> forward-declaration of struct pci_dev.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Applied to pci/misc for v3.18, thanks!  I dropped the struct pci_dev
declaration because it was already added by 5ccb8225abf2 ("x86/ras: Fix
build warnings in <linux/aer.h>")

> ---
>  include/linux/aer.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/aer.h b/include/linux/aer.h
> index 4dbaa7081530..04bcf33a3e3a 100644
> --- a/include/linux/aer.h
> +++ b/include/linux/aer.h
> @@ -7,6 +7,10 @@
>  #ifndef _AER_H_
>  #define _AER_H_
>  
> +#include <linux/types.h>
> +
> +struct pci_dev;
> +
>  #define AER_NONFATAL			0
>  #define AER_FATAL			1
>  #define AER_CORRECTABLE			2
> -- 
> 2.0.4
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-04 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 12:08 [PATCH] PCI/AER: Make linux/aer.h standalone includable Thierry Reding
2014-09-04 21:58 ` Bjorn Helgaas

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).