[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191031110304.GE21133@nazgul.tnic>
Date: Thu, 31 Oct 2019 12:03:04 +0100
From: Borislav Petkov <bp@...en8.de>
To: zhong jiang <zhongjiang@...wei.com>
Cc: peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
dave.hansen@...ux.intel.com, hpa@...or.com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/ioremap: Use WARN_ONCE instead of printk() +
WARN_ON_ONCE()
On Wed, Oct 30, 2019 at 04:57:18PM +0800, zhong jiang wrote:
> WARN_ONCE is more clear and simpler. Just replace it.
>
> Signed-off-by: zhong jiang <zhongjiang@...wei.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 a39dcdb..3b74599 100644
> --- a/arch/x86/mm/ioremap.c
> +++ b/arch/x86/mm/ioremap.c
> @@ -172,9 +172,8 @@ static void __ioremap_check_mem(resource_size_t 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);
Does
WARN_ONCE(!phys_addr_valid(phys_addr),
"ioremap: invalid physical address %llx\n",
(unsigned long long)phys_addr);
work too?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
Powered by blists - more mailing lists