Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754654AbbBTRzx (ORCPT ); Fri, 20 Feb 2015 12:55:53 -0500 Received: from mail-lb0-f171.google.com ([209.85.217.171]:42413 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754082AbbBTRzw (ORCPT ); Fri, 20 Feb 2015 12:55:52 -0500 From: Alexander Kuleshov To: "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Kees Cook Cc: linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH] x86/compressed: remove unnecessary check Date: Fri, 20 Feb 2015 23:55:31 +0600 Message-Id: <1424454931-22428-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.3.0.80.g18d0fec Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 34 region.start is entry->addr, but we already did check for case when entry->addr + entry->size < minimum, so no need to check that region.start is less than minimum. Signed-off-by: Alexander Kuleshov --- arch/x86/boot/compressed/aslr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c index bb13763..13424a9 100644 --- a/arch/x86/boot/compressed/aslr.c +++ b/arch/x86/boot/compressed/aslr.c @@ -249,11 +249,7 @@ static void process_e820_entry(struct e820entry *entry, region.start = entry->addr; region.size = entry->size; - - /* Potentially raise address to minimum location. */ - if (region.start < minimum) - region.start = minimum; - + /* Potentially raise address to meet alignment requirements. */ region.start = ALIGN(region.start, CONFIG_PHYSICAL_ALIGN); -- 2.3.0.80.g18d0fec -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/