All of lore.kernel.org
 help / color / mirror / Atom feed
From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] ixp4xx: make __arch_ioremap() with 0 size return NULL
Date: Mon,  1 Aug 2011 13:31:05 +0100	[thread overview]
Message-ID: <1312201870-12921-4-git-send-email-jamie@jamieiles.com> (raw)
In-Reply-To: <1312201870-12921-1-git-send-email-jamie@jamieiles.com>

Without __arch_ioremap(), __get_vm_area_node() with a zero size will
return a NULL pointer.  Make the arch specific ioremap() do the same
thing.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/mach-ixp4xx/include/mach/io.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index 57b5410..99cd9ac 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -62,6 +62,9 @@ static inline int is_pci_memory(u32 addr)
 static inline void __iomem * __indirect_ioremap(unsigned long addr, size_t size,
 						unsigned int mtype)
 {
+	if (!size)
+		return NULL;
+
 	if (!is_pci_memory(addr))
 		return __arm_ioremap(addr, size, mtype);
 
-- 
1.7.4.1

  parent reply	other threads:[~2011-08-01 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01 12:31 [PATCH 1/9] davinci: make __arch_ioremap() with 0 size return NULL Jamie Iles
2011-08-01 12:31 ` [PATCH 2/9] ebsa110: " Jamie Iles
2011-08-01 12:31 ` [PATCH 3/9] ixp23xx: " Jamie Iles
2011-08-01 12:31 ` Jamie Iles [this message]
2011-08-01 12:31 ` [PATCH 5/9] kirkwood: " Jamie Iles
2011-08-01 12:31 ` [PATCH 6/9] orion: " Jamie Iles
2011-08-01 12:31 ` [PATCH 7/9] tegra: " Jamie Iles
2011-08-01 12:31 ` [PATCH 8/9] iop: " Jamie Iles
2011-08-01 12:31 ` [PATCH 9/9] omap: " Jamie Iles

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=1312201870-12921-4-git-send-email-jamie@jamieiles.com \
    --to=jamie@jamieiles.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.