From: "Michael S. Tsirkin" <mst@redhat.com>
To: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: ehabkost@redhat.com, imammedo@redhat.com,
peter.maydell@linaro.org, qemu-devel@nongnu.org,
indou.takao@jp.fujitsu.com
Subject: Re: [Qemu-devel] [RESEND PATCH for-2.12 2/2] hw/acpi-build: Make next_base easy to follow
Date: Fri, 22 Dec 2017 21:31:20 +0200 [thread overview]
Message-ID: <20171222213109-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20171214040855.22231-3-douly.fnst@cn.fujitsu.com>
On Thu, Dec 14, 2017 at 12:08:55PM +0800, Dou Liyang wrote:
> It may be hard to read the assignment statement of "next_base", so
>
> S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
> /next_base = mem_base + mem_len;
>
> ... for readability.
>
> No functionality change.
>
> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/i386/acpi-build.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 73519ab3ac..2010108ae0 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -2381,7 +2381,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
> }
> mem_base = 1ULL << 32;
> mem_len = next_base - pcms->below_4g_mem_size;
> - next_base += (1ULL << 32) - pcms->below_4g_mem_size;
> + next_base = mem_base + mem_len;
> }
> numamem = acpi_data_push(table_data, sizeof *numamem);
> build_srat_memory(numamem, mem_base, mem_len, i - 1,
> --
> 2.14.3
>
>
next prev parent reply other threads:[~2017-12-22 19:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 4:08 [Qemu-devel] [RESEND PATCH for-2.12 0/2] ACPI/unit-test: Add a testcase Dou Liyang
2017-12-14 4:08 ` [Qemu-devel] [RESEND PATCH for-2.12 1/2] ACPI/unit-test: Add a testcase for RAM allocation in numa node Dou Liyang
2017-12-27 11:33 ` Igor Mammedov
2017-12-14 4:08 ` [Qemu-devel] [RESEND PATCH for-2.12 2/2] hw/acpi-build: Make next_base easy to follow Dou Liyang
2017-12-22 19:31 ` Michael S. Tsirkin [this message]
2017-12-27 11:20 ` Igor Mammedov
2017-12-18 22:09 ` [Qemu-devel] [RESEND PATCH for-2.12 0/2] ACPI/unit-test: Add a testcase Eduardo Habkost
2017-12-19 4:01 ` Dou Liyang
2017-12-20 21:38 ` Eduardo Habkost
2017-12-22 19:24 ` Igor Mammedov
2017-12-22 19:30 ` Michael S. Tsirkin
2018-01-12 7:23 ` Dou Liyang
2018-01-12 7:26 ` Dou Liyang
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=20171222213109-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=douly.fnst@cn.fujitsu.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=indou.takao@jp.fujitsu.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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).