All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: yinghai@kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, setup: code clean of e820_reserve_setup_data()
Date: Thu, 4 Jun 2015 07:42:38 +0200	[thread overview]
Message-ID: <20150604054238.GA6770@gmail.com> (raw)
In-Reply-To: <1433384326-16863-1-git-send-email-weiyang@linux.vnet.ibm.com>


* Wei Yang <weiyang@linux.vnet.ibm.com> wrote:

> pa_data and found are highly related, so there is no need to set a found
> flag.
> 
> This patch removes the found and just return when pa_data is NULL.
> 
> Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
> ---
>  arch/x86/kernel/setup.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0a2421c..b95e653 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -461,19 +461,18 @@ static void __init e820_reserve_setup_data(void)
>  {
>  	struct setup_data *data;
>  	u64 pa_data;
> -	int found = 0;
>  
>  	pa_data = boot_params.hdr.setup_data;
> +	if (!pa_data)
> +		return;
> +
>  	while (pa_data) {
>  		data = early_memremap(pa_data, sizeof(*data));
>  		e820_update_range(pa_data, sizeof(*data)+data->len,
>  			 E820_RAM, E820_RESERVED_KERN);
> -		found = 1;
>  		pa_data = data->next;
>  		early_iounmap(data, sizeof(*data));
>  	}
> -	if (!found)
> -		return;
>  
>  	sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
>  	memcpy(&e820_saved, &e820, sizeof(struct e820map));

This patch does not apply to Linus's latest tree.

Thanks,

	Ingo

  reply	other threads:[~2015-06-04  5:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04  2:18 [PATCH] x86, setup: code clean of e820_reserve_setup_data() Wei Yang
2015-06-04  5:42 ` Ingo Molnar [this message]
2015-06-04  7:07   ` Wei Yang
2015-06-04  6:18 ` Wei Yang
2015-06-07  8:33   ` [tip:x86/boot] x86/boot/setup: Clean up the e820_reserve_setup_data() code tip-bot for Wei Yang

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=20150604054238.GA6770@gmail.com \
    --to=mingo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyang@linux.vnet.ibm.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.