All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Yuntao Wang <ytcoode@gmail.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Vivek Goyal <vgoyal@redhat.com>,
	Dave Young <dyoung@redhat.com>,
	Hari Bathini <hbathini@linux.ibm.com>,
	Eric DeVolder <eric.devolder@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	Sean Christopherson <seanjc@google.com>,
	Takashi Iwai <tiwai@suse.de>, Lianbo Jiang <lijiang@redhat.com>
Subject: Re: [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value
Date: Fri, 15 Dec 2023 11:28:07 +0800	[thread overview]
Message-ID: <ZXvHx+HYI4zgV47b@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20231214163842.129139-3-ytcoode@gmail.com>

On 12/15/23 at 12:38am, Yuntao Wang wrote:
> Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable.
> 
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> ---
>  arch/x86/kernel/crash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index 792231a56d11..249b5876e7ec 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c

Acked-by: Baoquan He <bhe@redhat.com>

> @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
>  	int ret = 0;
>  
>  	/* Exclude the low 1M because it is always reserved */
> -	ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1);
> +	ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
>  	if (ret)
>  		return ret;
>  
> -- 
> 2.43.0
> 


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: Yuntao Wang <ytcoode@gmail.com>
Cc: linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Vivek Goyal <vgoyal@redhat.com>,
	Dave Young <dyoung@redhat.com>,
	Hari Bathini <hbathini@linux.ibm.com>,
	Eric DeVolder <eric.devolder@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sourabh Jain <sourabhjain@linux.ibm.com>,
	Sean Christopherson <seanjc@google.com>,
	Takashi Iwai <tiwai@suse.de>, Lianbo Jiang <lijiang@redhat.com>
Subject: Re: [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value
Date: Fri, 15 Dec 2023 11:28:07 +0800	[thread overview]
Message-ID: <ZXvHx+HYI4zgV47b@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20231214163842.129139-3-ytcoode@gmail.com>

On 12/15/23 at 12:38am, Yuntao Wang wrote:
> Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable.
> 
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> ---
>  arch/x86/kernel/crash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
> index 792231a56d11..249b5876e7ec 100644
> --- a/arch/x86/kernel/crash.c
> +++ b/arch/x86/kernel/crash.c

Acked-by: Baoquan He <bhe@redhat.com>

> @@ -170,7 +170,7 @@ static int elf_header_exclude_ranges(struct crash_mem *cmem)
>  	int ret = 0;
>  
>  	/* Exclude the low 1M because it is always reserved */
> -	ret = crash_exclude_mem_range(cmem, 0, (1<<20)-1);
> +	ret = crash_exclude_mem_range(cmem, 0, SZ_1M - 1);
>  	if (ret)
>  		return ret;
>  
> -- 
> 2.43.0
> 


  reply	other threads:[~2023-12-15  3:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 16:38 [PATCH 0/3] Some cleanups and fixes Yuntao Wang
2023-12-14 16:38 ` Yuntao Wang
2023-12-14 16:38 ` [PATCH 1/3] x86/crash: remove the unused image parameter from prepare_elf_headers() Yuntao Wang
2023-12-14 16:38   ` Yuntao Wang
2023-12-15  3:27   ` Baoquan He
2023-12-15  3:27     ` Baoquan He
2023-12-14 16:38 ` [PATCH 2/3] x86/crash: use SZ_1M macro instead of hardcoded value Yuntao Wang
2023-12-14 16:38   ` Yuntao Wang
2023-12-15  3:28   ` Baoquan He [this message]
2023-12-15  3:28     ` Baoquan He
2023-12-14 16:38 ` [PATCH 3/3] crash_core: fix and simplify the logic of crash_exclude_mem_range() Yuntao Wang
2023-12-14 16:38   ` Yuntao Wang
2023-12-15 15:15   ` Baoquan He
2023-12-15 15:15     ` Baoquan He
2023-12-16  1:54     ` Yuntao Wang
2023-12-16  1:54       ` Yuntao Wang
2023-12-16  3:31       ` Baoquan He
2023-12-16  3:31         ` Baoquan He
2023-12-29 20:10         ` Andrew Morton
2023-12-29 20:10           ` Andrew Morton
2023-12-30 10:16           ` Baoquan He
2023-12-30 10:16             ` Baoquan He
2024-01-02  8:41             ` Baoquan He
2024-01-02  8:41               ` Baoquan He
2024-01-02 15:06               ` Yuntao Wang
2024-01-02 15:06                 ` Yuntao Wang

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=ZXvHx+HYI4zgV47b@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dyoung@redhat.com \
    --cc=eric.devolder@oracle.com \
    --cc=hbathini@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=lijiang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=seanjc@google.com \
    --cc=sourabhjain@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    --cc=ytcoode@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 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.