Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751132AbdGNEa5 (ORCPT ); Fri, 14 Jul 2017 00:30:57 -0400 Received: from gateway31.websitewelcome.com ([192.185.143.36]:42995 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbdGNEa4 (ORCPT ); Fri, 14 Jul 2017 00:30:56 -0400 Date: Thu, 13 Jul 2017 23:30:52 -0500 From: "Gustavo A. R. Silva" To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: mm: iomap: use is_vmalloc_addr Message-ID: <20170714043052.GA27345@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.152.152.176 X-Exim-ID: 1dVsFh-003ljC-KB X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [189.152.152.176]:48578 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 724 Lines: 25 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 --- 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