lkml.org 
[lkml]   [2019]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/ioremap: Use WARN_ONCE instead of printk() + WARN_ON_ONCE()
Date
WARN_ONCE is more clear and simpler. Just replace it.

Signed-off-by: zhong jiang <zhongjiang@huawei.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);
return NULL;
}

--
1.7.12.4
\
 
 \ /
  Last update: 2019-10-30 10:02    [W:0.061 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site