Skip to contentSkip to conversation

powerpc/85xx: Add platform_device declaration to fsl_pci.h

PATCH In review Jia Hongtao 2 participants 5 messages Mar 4, 2013 – Mar 15, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/85xx: Add platform_device declaration to fsl_pci.h

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.

---
 arch/powerpc/sysdev/fsl_pci.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/powerpc/sysdev/fsl_pci.h +2 -0
index c495c00..df66721 100644
@@ -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 */
Signature · 1 line
1.7.5.1
#1 lore raw
Quoted 9 lines · Jia Hongtao

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.

---
arch/powerpc/sysdev/fsl_pci.h | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)

Where does the compile error show up?

- k

Quoted 16 lines
arch/powerpc/sysdev/fsl_pci.h +2 -0
index c495c00..df66721 100644
@@ -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 */
Signature · 1 line
1.7.5.1
#2 lore raw
Quoted 22 lines

-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Saturday, March 09, 2013 4:38 AM
To: Jia Hongtao-B38951
Cc: [email protected]; 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

Quoted 9 lines

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.

---
arch/powerpc/sysdev/fsl_pci.h | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 4 lines

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

Quoted 20 lines

=20

arch/powerpc/sysdev/fsl_pci.h line 19

Quoted 11 lines
(quoted diff) +0 -0

b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644

arch/powerpc/sysdev/fsl_pci.h +2 -0
@@ -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 */

arch/powerpc/sysdev/fsl_pci.h line 21

Quoted 2 lines
arch/powerpc/sysdev/fsl_pci.h +0 -0
 #define PCIE_LTSSM_L0	0x16		/* L0 state */
 #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version

Rev2.2 */

Quoted 3 lines

--
1.7.5.1

=20

#3 lore raw
Quoted 14 lines · On Mar 10, 2013, at 9:36 PM, Jia Hongtao-B38951 wrote:

=20
=20

Quoted 12 lines

-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Saturday, March 09, 2013 4:38 AM
To: Jia Hongtao-B38951
Cc: [email protected]; 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

Quoted 1 line

mpc85xx_pci_err_probe(struct platform_device *op) need =

platform_device

Quoted 1 line
Quoted 1 line
Quoted 1 line

declaration for definition. Otherwise, it will cause compile error =

if

Quoted 1 line
Quoted 1 line
Quoted 1 line

any files including fsl_pci.h without declaration of =

platform_device.

Quoted 10 lines
Quoted 10 lines
Quoted 6 lines

=20

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

Quoted 12 lines

=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

Quoted 1 line

arch/powerpc/sysdev/fsl_pci.h:108:34: error: its scope is only this =

definition or declaration, which is probably not what you want

Quoted 3 lines

"
=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.

Quoted 19 lines

=20
Thanks.
-Hongtao.
=20

Quoted 15 lines

=20

Quoted 11 lines
(quoted diff) +0 -0

b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644

arch/powerpc/sysdev/fsl_pci.h +0 -0
@@ -14,6 +14,8 @@
 #ifndef __POWERPC_FSL_PCI_H
 #define __POWERPC_FSL_PCI_H

=20

arch/powerpc/sysdev/fsl_pci.h +2 -0
+#include <linux/platform_device.h>
+

#define PCIE_LTSSM 0x0404 /* PCIE Link Training and

Status */

Quoted 2 lines

#define PCIE_LTSSM_L0 0x16 /* L0 state */
#define PCIE_IP_REV_2_2 0x02080202 /* PCIE IP block =

version

Quoted 6 lines
Quoted 5 lines

Rev2.2 */

Quoted 3 lines

--
1.7.5.1
=20

=20

=20

#4 lore raw
Quoted 57 lines

-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Wednesday, March 13, 2013 4:46 AM
To: Jia Hongtao-B38951
Cc: [email protected]; 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

Quoted 11 lines
Quoted 11 lines

-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Saturday, March 09, 2013 4:38 AM
To: Jia Hongtao-B38951
Cc: [email protected]; Wood Scott-B07421; Li Yang-R58472
Subject: Re: [PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h

Quoted 3 lines
Quoted 3 lines · Jia Hongtao
Quoted 2 lines

mpc85xx_pci_err_probe(struct platform_device *op) need

platform_device

Quoted 17 lines
Quoted 9 lines
Quoted 8 lines

declaration for definition. Otherwise, it will cause compile error if any files including fsl_pci.h without declaration of platform_device.

---
arch/powerpc/sysdev/fsl_pci.h | 2 ++

1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 3 lines

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.

Quoted 7 lines

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

Quoted 1 line

arch/powerpc/sysdev/fsl_pci.h:108:34: error: its scope is only this

definition or declaration, which is probably not what you want

Quoted 2 lines

"

Quoted 8 lines
Quoted 1 line

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

Quoted 27 lines

=20

Quoted 25 lines

Thanks.
-Hongtao.

Quoted 20 lines

arch/powerpc/sysdev/fsl_pci.h line 19

Quoted 12 lines
(quoted diff) +0 -0

b/arch/powerpc/sysdev/fsl_pci.h index c495c00..df66721 100644

arch/powerpc/sysdev/fsl_pci.h +2 -0
@@ -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 */

arch/powerpc/sysdev/fsl_pci.h line 21

Quoted 2 lines
arch/powerpc/sysdev/fsl_pci.h +0 -0
 #define PCIE_LTSSM_L0	0x16		/* L0 state */
 #define PCIE_IP_REV_2_2		0x02080202 /* PCIE IP block version

Rev2.2 */

Quoted 3 lines

--
1.7.5.1

=20