linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h
@ 2013-03-04  8:40 Jia Hongtao
  2013-03-08 20:38 ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: Jia Hongtao @ 2013-03-04  8:40 UTC (permalink / raw)
  To: linuxppc-dev, galak; +Cc: B07421, b38951

mpc85xx_pci_err_probe(struct platform_device *op) need platform_device
declaration for definition. Otherwise, it will cause compile error if any
files including fsl_pci.h without declaration of platform_device.

Signed-off-by: Jia Hongtao <B38951@freescale.com>
---
 arch/powerpc/sysdev/fsl_pci.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index c495c00..df66721 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -14,6 +14,8 @@
 #ifndef __POWERPC_FSL_PCI_H
 #define __POWERPC_FSL_PCI_H
 
+#include <linux/platform_device.h>
+
 #define PCIE_LTSSM	0x0404		/* PCIE Link Training and Status */
 #define PCIE_LTSSM_L0	0x16		/* L0 state */
 #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version Rev2.2 */
-- 
1.7.5.1

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

* Re: [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h
  2013-03-04  8:40 [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h Jia Hongtao
@ 2013-03-08 20:38 ` Kumar Gala
  2013-03-11  2:36   ` Jia Hongtao-B38951
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2013-03-08 20:38 UTC (permalink / raw)
  To: Jia Hongtao; +Cc: B07421, linuxppc-dev


On Mar 4, 2013, at 2:40 AM, Jia Hongtao wrote:

> mpc85xx_pci_err_probe(struct platform_device *op) need platform_device
> declaration for definition. Otherwise, it will cause compile error if any
> files including fsl_pci.h without declaration of platform_device.
> 
> Signed-off-by: Jia Hongtao <B38951@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_pci.h |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
> 

Where does the compile error show up?

- k

> diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
> index c495c00..df66721 100644
> --- a/arch/powerpc/sysdev/fsl_pci.h
> +++ b/arch/powerpc/sysdev/fsl_pci.h
> @@ -14,6 +14,8 @@
> #ifndef __POWERPC_FSL_PCI_H
> #define __POWERPC_FSL_PCI_H
> 
> +#include <linux/platform_device.h>
> +
> #define PCIE_LTSSM	0x0404		/* PCIE Link Training and Status */
> #define PCIE_LTSSM_L0	0x16		/* L0 state */
> #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version Rev2.2 */
> -- 
> 1.7.5.1
> 

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

* RE: [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h
  2013-03-08 20:38 ` Kumar Gala
@ 2013-03-11  2:36   ` Jia Hongtao-B38951
  2013-03-12 20:46     ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: Jia Hongtao-B38951 @ 2013-03-11  2:36 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org, Li Yang-R58472



> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Saturday, March 09, 2013 4:38 AM
> To: Jia Hongtao-B38951
> Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; Li Yang-R58472
> Subject: Re: [PATCH] powerpc/85xx: Add platform_device declaration to
> fsl_pci.h
>=20
>=20
> On Mar 4, 2013, at 2:40 AM, Jia Hongtao wrote:
>=20
> > mpc85xx_pci_err_probe(struct platform_device *op) need platform_device
> > declaration for definition. Otherwise, it will cause compile error if
> > any files including fsl_pci.h without declaration of platform_device.
> >
> > Signed-off-by: Jia Hongtao <B38951@freescale.com>
> > ---
> > arch/powerpc/sysdev/fsl_pci.h |    2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
>=20
> Where does the compile error show up?
>=20
> - k

The function mpc85xx_pci_err_probe(struct platform_device *op) need
*platform_device* declaration so <linux/platform_device.h> must be
included.=20

For now there is no compile error occurred just because the file that
need fsl_pci.h happened to include <linux/platform_device.h> already.

If not the compile error log will be like this:
"
In file included from arch/powerpc/kernel/traps.c:62:0:
arch/powerpc/sysdev/fsl_pci.h:108:34: error: 'struct platform_device' decla=
red inside parameter list
arch/powerpc/sysdev/fsl_pci.h:108:34: error: its scope is only this definit=
ion or declaration, which is probably not what you want
"

You mean I have to show the compile error log in patch description?

Thanks.
-Hongtao.

>=20
> > diff --git a/arch/powerpc/sysdev/fsl_pci.h
> > b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644
> > --- a/arch/powerpc/sysdev/fsl_pci.h
> > +++ b/arch/powerpc/sysdev/fsl_pci.h
> > @@ -14,6 +14,8 @@
> > #ifndef __POWERPC_FSL_PCI_H
> > #define __POWERPC_FSL_PCI_H
> >
> > +#include <linux/platform_device.h>
> > +
> > #define PCIE_LTSSM	0x0404		/* PCIE Link Training and
> Status */
> > #define PCIE_LTSSM_L0	0x16		/* L0 state */
> > #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version
> Rev2.2 */
> > --
> > 1.7.5.1
> >
>=20

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

* Re: [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h
  2013-03-11  2:36   ` Jia Hongtao-B38951
@ 2013-03-12 20:46     ` Kumar Gala
  2013-03-15  6:15       ` Jia Hongtao-B38951
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2013-03-12 20:46 UTC (permalink / raw)
  To: Jia Hongtao-B38951
  Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org, Li Yang-R58472


On Mar 10, 2013, at 9:36 PM, Jia Hongtao-B38951 wrote:

>=20
>=20
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
>> Sent: Saturday, March 09, 2013 4:38 AM
>> To: Jia Hongtao-B38951
>> Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; Li Yang-R58472
>> Subject: Re: [PATCH] powerpc/85xx: Add platform_device declaration to
>> fsl_pci.h
>>=20
>>=20
>> On Mar 4, 2013, at 2:40 AM, Jia Hongtao wrote:
>>=20
>>> mpc85xx_pci_err_probe(struct platform_device *op) need =
platform_device
>>> declaration for definition. Otherwise, it will cause compile error =
if
>>> any files including fsl_pci.h without declaration of =
platform_device.
>>>=20
>>> Signed-off-by: Jia Hongtao <B38951@freescale.com>
>>> ---
>>> arch/powerpc/sysdev/fsl_pci.h |    2 ++
>>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>>=20
>>=20
>> Where does the compile error show up?
>>=20
>> - k
>=20
> The function mpc85xx_pci_err_probe(struct platform_device *op) need
> *platform_device* declaration so <linux/platform_device.h> must be
> included.=20
>=20
> For now there is no compile error occurred just because the file that
> need fsl_pci.h happened to include <linux/platform_device.h> already.
>=20
> If not the compile error log will be like this:
> "
> In file included from arch/powerpc/kernel/traps.c:62:0:
> arch/powerpc/sysdev/fsl_pci.h:108:34: error: 'struct platform_device' =
declared inside parameter list
> arch/powerpc/sysdev/fsl_pci.h:108:34: error: its scope is only this =
definition or declaration, which is probably not what you want
> "
>=20
> You mean I have to show the compile error log in patch description?

Not necessarily, I'm just trying to decide if we should include =
<linux/platform_device.h> or just do:

struct platform_device;

near the top of fsl_pci.h.

>=20
> Thanks.
> -Hongtao.
>=20
>>=20
>>> diff --git a/arch/powerpc/sysdev/fsl_pci.h
>>> b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644
>>> --- a/arch/powerpc/sysdev/fsl_pci.h
>>> +++ b/arch/powerpc/sysdev/fsl_pci.h
>>> @@ -14,6 +14,8 @@
>>> #ifndef __POWERPC_FSL_PCI_H
>>> #define __POWERPC_FSL_PCI_H
>>>=20
>>> +#include <linux/platform_device.h>
>>> +
>>> #define PCIE_LTSSM	0x0404		/* PCIE Link Training and
>> Status */
>>> #define PCIE_LTSSM_L0	0x16		/* L0 state */
>>> #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block =
version
>> Rev2.2 */
>>> --
>>> 1.7.5.1
>>>=20
>>=20
>=20

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

* RE: [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h
  2013-03-12 20:46     ` Kumar Gala
@ 2013-03-15  6:15       ` Jia Hongtao-B38951
  0 siblings, 0 replies; 5+ messages in thread
From: Jia Hongtao-B38951 @ 2013-03-15  6:15 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Wood Scott-B07421, linuxppc-dev@lists.ozlabs.org, Li Yang-R58472



> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Wednesday, March 13, 2013 4:46 AM
> To: Jia Hongtao-B38951
> Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; Li Yang-R58472
> Subject: Re: [PATCH] powerpc/85xx: Add platform_device declaration to
> fsl_pci.h
>=20
>=20
> On Mar 10, 2013, at 9:36 PM, Jia Hongtao-B38951 wrote:
>=20
> >
> >
> >> -----Original Message-----
> >> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> >> Sent: Saturday, March 09, 2013 4:38 AM
> >> To: Jia Hongtao-B38951
> >> Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; Li Yang-R58472
> >> Subject: Re: [PATCH] powerpc/85xx: Add platform_device declaration to
> >> fsl_pci.h
> >>
> >>
> >> On Mar 4, 2013, at 2:40 AM, Jia Hongtao wrote:
> >>
> >>> mpc85xx_pci_err_probe(struct platform_device *op) need
> platform_device
> >>> declaration for definition. Otherwise, it will cause compile error if
> >>> any files including fsl_pci.h without declaration of platform_device.
> >>>
> >>> Signed-off-by: Jia Hongtao <B38951@freescale.com>
> >>> ---
> >>> arch/powerpc/sysdev/fsl_pci.h |    2 ++
> >>> 1 files changed, 2 insertions(+), 0 deletions(-)
> >>>
> >>
> >> Where does the compile error show up?
> >>
> >> - k
> >
> > The function mpc85xx_pci_err_probe(struct platform_device *op) need
> > *platform_device* declaration so <linux/platform_device.h> must be
> > included.
> >
> > For now there is no compile error occurred just because the file that
> > need fsl_pci.h happened to include <linux/platform_device.h> already.
> >
> > If not the compile error log will be like this:
> > "
> > In file included from arch/powerpc/kernel/traps.c:62:0:
> > arch/powerpc/sysdev/fsl_pci.h:108:34: error: 'struct platform_device'
> declared inside parameter list
> > arch/powerpc/sysdev/fsl_pci.h:108:34: error: its scope is only this
> definition or declaration, which is probably not what you want
> > "
> >
> > You mean I have to show the compile error log in patch description?
>=20
> Not necessarily, I'm just trying to decide if we should include
> <linux/platform_device.h> or just do:
>=20
> struct platform_device;
>=20
> near the top of fsl_pci.h.

Actually just add "struct platform_device;" works too.
Only mpc85xx_edac.c use mpc85xx_pci_err_probe(struct platform_device *op)
and <linux/platform_device.h> has already included there.

I will update and send the new patch.

-Hongtao.=20

>=20
> >
> > Thanks.
> > -Hongtao.
> >
> >>
> >>> diff --git a/arch/powerpc/sysdev/fsl_pci.h
> >>> b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644
> >>> --- a/arch/powerpc/sysdev/fsl_pci.h
> >>> +++ b/arch/powerpc/sysdev/fsl_pci.h
> >>> @@ -14,6 +14,8 @@
> >>> #ifndef __POWERPC_FSL_PCI_H
> >>> #define __POWERPC_FSL_PCI_H
> >>>
> >>> +#include <linux/platform_device.h>
> >>> +
> >>> #define PCIE_LTSSM	0x0404		/* PCIE Link Training and
> >> Status */
> >>> #define PCIE_LTSSM_L0	0x16		/* L0 state */
> >>> #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version
> >> Rev2.2 */
> >>> --
> >>> 1.7.5.1
> >>>
> >>
> >
>=20

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

end of thread, other threads:[~2013-03-15  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04  8:40 [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h Jia Hongtao
2013-03-08 20:38 ` Kumar Gala
2013-03-11  2:36   ` Jia Hongtao-B38951
2013-03-12 20:46     ` Kumar Gala
2013-03-15  6:15       ` Jia Hongtao-B38951

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