All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: mm: iomap: use is_vmalloc_addr
@ 2017-07-14  4:30 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-14  4:30 UTC (permalink / raw)
  To: linux-arm-kernel

Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END,
use is_vmalloc_addr. Such function was specifically designed for that
purpose.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 arch/arm/mm/iomap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c
index 4614208..4bf5457 100644
--- a/arch/arm/mm/iomap.c
+++ b/arch/arm/mm/iomap.c
@@ -34,8 +34,7 @@ EXPORT_SYMBOL(pcibios_min_mem);
 
 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
 {
-	if ((unsigned long)addr >= VMALLOC_START &&
-	    (unsigned long)addr < VMALLOC_END)
+	if (is_vmalloc_addr(addr))
 		iounmap(addr);
 }
 EXPORT_SYMBOL(pci_iounmap);
-- 
2.5.0

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

* [PATCH] ARM: mm: iomap: use is_vmalloc_addr
@ 2017-07-14  4:30 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 2+ messages in thread
From: Gustavo A. R. Silva @ 2017-07-14  4:30 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel

Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END,
use is_vmalloc_addr. Such function was specifically designed for that
purpose.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 arch/arm/mm/iomap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c
index 4614208..4bf5457 100644
--- a/arch/arm/mm/iomap.c
+++ b/arch/arm/mm/iomap.c
@@ -34,8 +34,7 @@ EXPORT_SYMBOL(pcibios_min_mem);
 
 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
 {
-	if ((unsigned long)addr >= VMALLOC_START &&
-	    (unsigned long)addr < VMALLOC_END)
+	if (is_vmalloc_addr(addr))
 		iounmap(addr);
 }
 EXPORT_SYMBOL(pci_iounmap);
-- 
2.5.0

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

end of thread, other threads:[~2017-07-14  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14  4:30 [PATCH] ARM: mm: iomap: use is_vmalloc_addr Gustavo A. R. Silva
2017-07-14  4:30 ` Gustavo A. R. Silva

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.