From: Borislav Petkov <bp@alien8.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 5/8] x86/setup/crash: Cleanup some more
Date: Mon, 19 Oct 2015 11:17:45 +0200 [thread overview]
Message-ID: <1445246268-26285-6-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1445246268-26285-1-git-send-email-bp@alien8.de>
From: Borislav Petkov <bp@suse.de>
* Remove unused auto_set variable
* Cleanup local function variable declarations
* Reformat printk string and use pr_info()
No functionality change.
Reviewed-by: Dave Young <dyoung@redhat.com>
Reviewed-by: Joerg Roedel <jroedel@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: jerry_hoemann@hp.com
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Juergen Gross <jgross@suse.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: WANG Chao <chaowang@redhat.com>
Cc: x86-ml <x86@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/setup.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index ea086dd8e821..d4788719a1e2 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -499,17 +499,15 @@ static void __init memblock_x86_reserve_range_setup_data(void)
static int __init reserve_crashkernel_low(void)
{
#ifdef CONFIG_X86_64
- unsigned long long low_base = 0, low_size = 0;
+ unsigned long long base, low_base = 0, low_size = 0;
unsigned long total_low_mem;
- unsigned long long base;
- bool auto_set = false;
int ret;
total_low_mem = memblock_mem_size(1UL << (32 - PAGE_SHIFT));
/* crashkernel=Y,low */
ret = parse_crashkernel_low(boot_command_line, total_low_mem, &low_size, &base);
- if (ret != 0) {
+ if (ret) {
/*
* two parts from lib/swiotlb.c:
* -swiotlb size: user-specified with swiotlb= or default.
@@ -520,7 +518,6 @@ static int __init reserve_crashkernel_low(void)
* don't run out of DMA buffers for 32-bit devices.
*/
low_size = max(swiotlb_size_or_default() + (8UL << 20), 256UL << 20);
- auto_set = true;
} else {
/* passed with crashkernel=0,low ? */
if (!low_size)
@@ -550,8 +547,7 @@ static int __init reserve_crashkernel_low(void)
static void __init reserve_crashkernel(void)
{
- unsigned long long total_mem;
- unsigned long long crash_size, crash_base;
+ unsigned long long crash_size, crash_base, total_mem;
bool high = false;
int ret;
@@ -600,11 +596,10 @@ static void __init reserve_crashkernel(void)
return;
}
- printk(KERN_INFO "Reserving %ldMB of memory at %ldMB "
- "for crashkernel (System RAM: %ldMB)\n",
- (unsigned long)(crash_size >> 20),
- (unsigned long)(crash_base >> 20),
- (unsigned long)(total_mem >> 20));
+ pr_info("Reserving %ldMB of memory at %ldMB for crashkernel (System RAM: %ldMB)\n",
+ (unsigned long)(crash_size >> 20),
+ (unsigned long)(crash_base >> 20),
+ (unsigned long)(total_mem >> 20));
crashk_res.start = crash_base;
crashk_res.end = crash_base + crash_size - 1;
--
2.3.5
next prev parent reply other threads:[~2015-10-19 9:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 9:17 [PATCH 0/8] tip-queue 2015-10-19 Borislav Petkov
2015-10-19 9:17 ` [PATCH 1/8] x86/setup: Do not reserve crashkernel high memory if low reservation failed Borislav Petkov
2015-10-21 10:04 ` [tip:ras/core] " tip-bot for Baoquan He
2015-10-19 9:17 ` [PATCH 2/8] x86/amd_nb, EDAC: Rename amd_get_node_id() Borislav Petkov
2015-10-21 10:04 ` [tip:ras/core] " tip-bot for Aravind Gopalakrishnan
2015-10-19 9:17 ` [PATCH 3/8] x86/setup: Cleanup crashkernel reservation functions Borislav Petkov
2015-10-21 10:04 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19 9:17 ` [PATCH 4/8] x86/setup/crash: Remove alignment variable Borislav Petkov
2015-10-21 10:05 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19 9:17 ` Borislav Petkov [this message]
2015-10-21 10:05 ` [tip:ras/core] x86/setup/crash: Cleanup some more tip-bot for Borislav Petkov
2015-10-19 9:17 ` [PATCH 6/8] x86/setup/crash: Check memblock_reserve() retval Borislav Petkov
2015-10-21 10:05 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19 9:17 ` [PATCH 7/8] kexec/crash: Say which char is the unrecognized Borislav Petkov
2015-10-21 10:06 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-10-19 9:17 ` [PATCH 8/8] x86/mce: Fix thermal throttling reporting after kexec Borislav Petkov
2015-10-21 10:06 ` [tip:ras/core] " tip-bot for Andi Kleen
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=1445246268-26285-6-git-send-email-bp@alien8.de \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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 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).