Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932740AbcLROsl (ORCPT ); Sun, 18 Dec 2016 09:48:41 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33106 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753615AbcLROsi (ORCPT ); Sun, 18 Dec 2016 09:48:38 -0500 From: Wei Yang To: trivial@kernel.org, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH V2 1/2] mm/memblock.c: trivial code refine in memblock_is_region_memory() Date: Sun, 18 Dec 2016 14:47:49 +0000 Message-Id: <1482072470-26151-2-git-send-email-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1482072470-26151-1-git-send-email-richard.weiyang@gmail.com> References: <1482072470-26151-1-git-send-email-richard.weiyang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 709 Lines: 25 The base address is already guaranteed to be in the region by memblock_search(). This patch removes the check on base. Signed-off-by: Wei Yang --- mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memblock.c b/mm/memblock.c index 7608bc3..cd85303 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1615,7 +1615,7 @@ int __init_memblock memblock_is_region_memory(phys_addr_t base, phys_addr_t size if (idx == -1) return 0; - return memblock.memory.regions[idx].base <= base && + return /* memblock.memory.regions[idx].base <= base && */ (memblock.memory.regions[idx].base + memblock.memory.regions[idx].size) >= end; } -- 2.5.0