From: Baoquan He <bhe@redhat.com>
To: Chao Fan <fanc.fnst@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com,
tglx@linutronix.de, mingo@redhat.com, keescook@chromium.org,
yasu.isimatu@gmail.com, indou.takao@jp.fujitsu.com,
caoj.fnst@cn.fujitsu.com, douly.fnst@cn.fujitsu.com
Subject: Re: [PATCH v2 4/4] kaslr: clean up a useless variable and some usless space
Date: Mon, 13 Nov 2017 16:32:33 +0800 [thread overview]
Message-ID: <20171113083233.GF10474@x1> (raw)
In-Reply-To: <20171101113203.27741-5-fanc.fnst@cn.fujitsu.com>
On 11/01/17 at 07:32pm, Chao Fan wrote:
> There are two same variable "rc" in this function. One is in the
> circulation, the other is out of the circulation. The one out will never
> be used, so drop it.
You can send this clean up patch alone.
>
> Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
> ---
> 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 fcd640fdeaed..aff184e19270 100644
> --- a/arch/x86/boot/compressed/kaslr.c
> +++ b/arch/x86/boot/compressed/kaslr.c
> @@ -211,7 +211,6 @@ static int parse_immovable_mem(char *p,
> static void mem_avoid_memmap(char *str)
> {
> static int i;
> - int rc;
>
> if (i >= MAX_MEMMAP_REGIONS)
> return;
> @@ -290,7 +289,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");
>
> memcpy(tmp_cmdline, args, len);
> @@ -436,7 +435,7 @@ static void mem_avoid_init(unsigned long input, unsigned long input_size,
> cmd_line |= boot_params->hdr.cmd_line_ptr;
> /* Calculate size of cmd_line. */
> ptr = (char *)(unsigned long)cmd_line;
> - for (cmd_line_size = 0; ptr[cmd_line_size++]; )
> + for (cmd_line_size = 0; ptr[cmd_line_size++];)
> ;
> mem_avoid[MEM_AVOID_CMDLINE].start = cmd_line;
> mem_avoid[MEM_AVOID_CMDLINE].size = cmd_line_size;
> --
> 2.13.6
>
>
>
next prev parent reply other threads:[~2017-11-13 8:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 11:31 [PATCH v2 0/4] kaslr: extend movable_node to movable_node=nn[KMG]@ss[KMG] Chao Fan
2017-11-01 11:32 ` [PATCH v2 1/4] kaslr: parse the extended movable_node=nn[KMG]@ss[KMG] Chao Fan
2017-11-13 8:10 ` Baoquan He
2017-11-13 8:42 ` Chao Fan
2017-11-01 11:32 ` [PATCH v2 2/4] kaslr: select the memory region in immovable node to process Chao Fan
2017-11-09 8:21 ` Baoquan He
2017-11-10 1:14 ` Chao Fan
2017-11-10 3:03 ` Chao Fan
2017-11-10 3:14 ` Baoquan He
2017-11-10 4:20 ` Chao Fan
2017-11-10 6:02 ` Chao Fan
2017-11-13 8:31 ` Baoquan He
2017-11-13 9:18 ` Chao Fan
2017-11-13 9:26 ` Baoquan He
2017-11-13 9:50 ` Chao Fan
2017-11-13 11:02 ` Baoquan He
2017-11-01 11:32 ` [PATCH v2 3/4] document: change the document for the extended movable_node Chao Fan
2017-11-01 11:32 ` [PATCH v2 4/4] kaslr: clean up a useless variable and some usless space Chao Fan
2017-11-13 8:32 ` Baoquan He [this message]
2017-11-13 9:19 ` Chao Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171113083233.GF10474@x1 \
--to=bhe@redhat.com \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=fanc.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=indou.takao@jp.fujitsu.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yasu.isimatu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).