From: Borislav Petkov <bp@alien8.de>
To: Qing Wang <wangqing@vivo.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: mm: use WARN_ONCE instead of printk and WARN_ON_ONCE
Date: Tue, 7 Dec 2021 15:10:12 +0100 [thread overview]
Message-ID: <Ya9rRL0Bhv7SnV5C@zn.tnic> (raw)
In-Reply-To: <1638881702-3106-1-git-send-email-wangqing@vivo.com>
On Tue, Dec 07, 2021 at 04:55:00AM -0800, Qing Wang wrote:
> From: Wang Qing <wangqing@vivo.com>
>
> Simply use WARN_ONCE instead of printk(KERN_WARNING, ...) and WARN_ON_ONCE.
>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
> arch/x86/mm/ioremap.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
> index 026031b..af9a321
> --- a/arch/x86/mm/ioremap.c
> +++ b/arch/x86/mm/ioremap.c
> @@ -195,9 +195,8 @@ __ioremap_caller(resource_size_t phys_addr, unsigned long size,
> return NULL;
>
> if (!phys_addr_valid(phys_addr)) {
> - printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
> - (unsigned long long)phys_addr);
> - WARN_ON_ONCE(1);
> + WARN_ONCE(1, "ioremap: invalid physical address %llx\n",
> + (unsigned long long)phys_addr);
> return NULL;
> }
>
> --
This is not an equivalent transformation.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
prev parent reply other threads:[~2021-12-07 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 12:55 Qing Wang
2021-12-07 14:10 ` Borislav Petkov [this message]
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=Ya9rRL0Bhv7SnV5C@zn.tnic \
--to=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=wangqing@vivo.com \
--cc=x86@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
all inboxes | Powered by JetHome®