From: Olof Johansson <olof@lixom.net>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: linuxppc-dev@ozlabs.org, Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
Date: Mon, 9 Oct 2006 10:40:43 -0500 [thread overview]
Message-ID: <20061009104043.0d4c6416@localhost.localdomain> (raw)
In-Reply-To: <20061009152309.GQ29920@ftp.linux.org.uk>
On Mon, 9 Oct 2006 16:23:09 +0100 Al Viro <viro@ftp.linux.org.uk> wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Olof Johansson <olof@lixom.net>
> ---
> arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++-------------
> 1 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
> index 4679c52..39020c1 100644
> --- a/arch/powerpc/platforms/pasemi/pci.c
> +++ b/arch/powerpc/platforms/pasemi/pci.c
> @@ -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;
WARNING: multiple messages have this Message-ID (diff)
From: Olof Johansson <olof@lixom.net>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Linus Torvalds <torvalds@osdl.org>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c)
Date: Mon, 9 Oct 2006 10:40:43 -0500 [thread overview]
Message-ID: <20061009104043.0d4c6416@localhost.localdomain> (raw)
In-Reply-To: <20061009152309.GQ29920@ftp.linux.org.uk>
On Mon, 9 Oct 2006 16:23:09 +0100 Al Viro <viro@ftp.linux.org.uk> wrote:
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Olof Johansson <olof@lixom.net>
> ---
> arch/powerpc/platforms/pasemi/pci.c | 26 +++++++++++++-------------
> 1 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
> index 4679c52..39020c1 100644
> --- a/arch/powerpc/platforms/pasemi/pci.c
> +++ b/arch/powerpc/platforms/pasemi/pci.c
> @@ -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;
next prev parent reply other threads:[~2006-10-09 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-09 15:23 [PATCH] trivial iomem annotations (arch/powerpc/platfroms/parsemi/pci.c) Al Viro
2006-10-09 15:40 ` Olof Johansson [this message]
2006-10-09 15:40 ` Olof Johansson
2006-10-10 23:16 ` Michael Buesch
2006-10-10 23:16 ` Michael Buesch
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=20061009104043.0d4c6416@localhost.localdomain \
--to=olof@lixom.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=torvalds@osdl.org \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.