trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
PATCH 1/1 trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
Signed-off-by Al Viro <[email protected]>
--- arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
arch/powerpc/platforms/pasemi/pci.c +13 -13
@@ -35,17 +35,17 @@ #define PA_PXP_CFA(bus, devfn, off) (((b#define CONFIG_OFFSET_VALID (off) ((off) < 4096) -static unsigned long pa_pxp_cfg_addr (struct pci_controller *hose, +static void volatile __iomem *pa_pxp_cfg_addr (struct pci_controller *hose,u8 bus,u8 devfn,int offset) { -return ((unsigned long )hose->cfg_data) +PA_PXP_CFA (bus, devfn, offset); +return hose->cfg_data +PA_PXP_CFA (bus, devfn, offset); }static int pa_pxp_read_config (struct pci_bus *bus,unsigned int devfn,int offset,int len,u32 *val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr; hose =pci_bus_to_host (bus);if (!hose)
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci*/ switch (len) {case 1 : - *val =in_8 ((u8 *)addr); + *val =in_8 (addr);break ;case 2 : - *val =in_le16 ((u16 *)addr); + *val =in_le16 (addr);break ;default : - *val =in_le32 ((u32 *)addr); + *val =in_le32 (addr);break ; }
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pc int offset, int len, u32 val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr; hose =pci_bus_to_host (bus);if (!hose)
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pc*/ switch (len) {case 1 : -out_8 ((u8 *)addr, val); - (void )in_8 ((u8 *)addr); +out_8 (addr, val); + (void )in_8 (addr);break ;case 2 : -out_le16 ((u16 *)addr, val); - (void )in_le16 ((u16 *)addr); +out_le16 (addr, val); + (void )in_le16 (addr);break ;default : -out_le32 ((u32 *)addr, val); - (void )in_le32 ((u32 *)addr); +out_le32 (addr, val); + (void )in_le32 (addr);break ; }return PCIBIOS_SUCCESSFUL ;
Signature · 1 line
1.4.2.GIT
Quoted 1 line · On Mon, 9 Oct 2006 16:23:09 +0100 Al Viro <[email protected]> wrote:
Signed-off-by Al Viro <[email protected]>
Acked-by Olof Johansson <[email protected]>
Quoted 78 lines
--- arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)arch/powerpc/platforms/pasemi/pci.c +13
-13@@ -35,17 +35,17 @@ #define PA_PXP_CFA(bus, devfn, off) (((b#define CONFIG_OFFSET_VALID (off) ((off) < 4096) -static unsigned long pa_pxp_cfg_addr (struct pci_controller *hose, +static void volatile __iomem *pa_pxp_cfg_addr (struct pci_controller *hose,u8 bus,u8 devfn,int offset) { -return ((unsigned long )hose->cfg_data) +PA_PXP_CFA (bus, devfn, offset); +return hose->cfg_data +PA_PXP_CFA (bus, devfn, offset); }static int pa_pxp_read_config (struct pci_bus *bus,unsigned int devfn,int offset,int len,u32 *val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr; hose =pci_bus_to_host (bus);if (!hose)@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci*/ switch (len) {case 1 : - *val =in_8 ((u8 *)addr); + *val =in_8 (addr);break ;case 2 : - *val =in_le16 ((u16 *)addr); + *val =in_le16 (addr);break ;default : - *val =in_le32 ((u32 *)addr); + *val =in_le32 (addr);break ; }@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pc int offset, int len, u32 val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr; hose =pci_bus_to_host (bus);if (!hose)@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pc*/ switch (len) {case 1 : -out_8 ((u8 *)addr, val); - (void )in_8 ((u8 *)addr); +out_8 (addr, val); + (void )in_8 (addr);break ;case 2 : -out_le16 ((u16 *)addr, val); - (void )in_le16 ((u16 *)addr); +out_le16 (addr, val); + (void )in_le16 (addr);break ;default : -out_le32 ((u32 *)addr, val); - (void )in_le32 ((u32 *)addr); +out_le32 (addr, val); + (void )in_le32 (addr);break ; }return PCIBIOS_SUCCESSFUL ;
Quoted 17 lines · Al Viro
Signed-off-by Al Viro <[email protected]>--- arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)arch/powerpc/platforms/pasemi/pci.c +1
-1@@ -35,17 +35,17 @@ #define PA_PXP_CFA(bus, devfn, off) (((b#define CONFIG_OFFSET_VALID (off) ((off) < 4096) -static unsigned long pa_pxp_cfg_addr (struct pci_controller *hose, +static void volatile __iomem *pa_pxp_cfg_addr (struct pci_controller *hose,u8 bus,u8 devfn,int offset) {
arch/powerpc/platforms/pasemi/pci.c #define PA_PXP_CFA(bus, devfn, off) (((b · line 48
Quoted 10 lines
arch/powerpc/platforms/pasemi/pci.c +2
-2-return ((unsigned long )hose->cfg_data) +PA_PXP_CFA (bus, devfn, offset); +return hose->cfg_data +PA_PXP_CFA (bus, devfn, offset); }static int pa_pxp_read_config (struct pci_bus *bus,unsigned int devfn,int offset,int len,u32 *val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr;
I think you should drop all these new "volatile"s.
Quoted 51 lines
arch/powerpc/platforms/pasemi/pci.c +10
-10hose =pci_bus_to_host (bus);if (!hose)@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci*/ switch (len) {case 1 : - *val =in_8 ((u8 *)addr); + *val =in_8 (addr);break ;case 2 : - *val =in_le16 ((u16 *)addr); + *val =in_le16 (addr);break ;default : - *val =in_le32 ((u32 *)addr); + *val =in_le32 (addr);break ; }@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pc int offset, int len, u32 val) {struct pci_controller *hose; -unsigned long addr; +void volatile __iomem *addr; hose =pci_bus_to_host (bus);if (!hose)@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pc*/ switch (len) {case 1 : -out_8 ((u8 *)addr, val); - (void )in_8 ((u8 *)addr); +out_8 (addr, val); + (void )in_8 (addr);break ;case 2 : -out_le16 ((u16 *)addr, val); - (void )in_le16 ((u16 *)addr); +out_le16 (addr, val); + (void )in_le16 (addr);break ;default : -out_le32 ((u32 *)addr, val); - (void )in_le32 ((u32 *)addr); +out_le32 (addr, val); + (void )in_le32 (addr);break ; }return PCIBIOS_SUCCESSFUL ;
Signature · 1 line
Greetings Michael.