From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753394AbdKWQfU (ORCPT ); Thu, 23 Nov 2017 11:35:20 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44091 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbdKWQfS (ORCPT ); Thu, 23 Nov 2017 11:35:18 -0500 Date: Thu, 23 Nov 2017 17:35:06 +0100 (CET) From: Thomas Gleixner To: Chao Fan cc: hpa@zytor.com, mingo@redhat.com, x86@kernel.org, keescook@chromium.org, gregkh@linuxfoundation.org, n-horiguchi@ah.jp.nec.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kaslr: clean up a useless variable and some usless space In-Reply-To: Message-ID: References: <20171123090847.15293-1-fanc.fnst@cn.fujitsu.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Nov 2017, Thomas Gleixner wrote: > On Thu, 23 Nov 2017, Chao Fan wrote: > > > There are two same variable "rc" in mem_avoid_memmap. One is in the > > circulation, the other is out of the circulation. The one out will never > > be used, so drop it. > > > > Signed-off-by: Chao Fan > > --- > > arch/x86/boot/compressed/kaslr.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c > > index a63fbc25ce84..8199a6187251 100644 > > --- a/arch/x86/boot/compressed/kaslr.c > > +++ b/arch/x86/boot/compressed/kaslr.c > > @@ -171,7 +171,6 @@ parse_memmap(char *p, unsigned long long *start, unsigned long long *size) > > static void mem_avoid_memmap(char *str) > > { > > static int i; > > - int rc; > > > > if (i >= MAX_MEMMAP_REGIONS) > > return; > > @@ -219,7 +218,7 @@ static int handle_mem_memmap(void) > > return 0; > > > > tmp_cmdline = malloc(len + 1); > > - if (!tmp_cmdline ) > > + if (!tmp_cmdline) > > error("Failed to allocate space for tmp_cmdline"); > > This change is unrelated. Never mind. Just noticed that it's mentioned in $subject.