linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/ioremap: Use WARN_ONCE instead of printk() + WARN_ON_ONCE()
@ 2019-10-30  8:57 zhong jiang
  2019-10-31 11:03 ` Borislav Petkov
  0 siblings, 1 reply; 12+ messages in thread
From: zhong jiang @ 2019-10-30  8:57 UTC (permalink / raw)
  To: peterz, tglx, mingo; +Cc: dave.hansen, bp, hpa, zhongjiang, x86, linux-kernel

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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-11-01 16:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  8:57 [PATCH] mm/ioremap: Use WARN_ONCE instead of printk() + WARN_ON_ONCE() zhong jiang
2019-10-31 11:03 ` Borislav Petkov
2019-10-31 11:36   ` zhong jiang
2019-10-31 12:00     ` Joe Perches
2019-10-31 12:40       ` zhong jiang
2019-11-01 15:18       ` zhong jiang
2019-10-31 11:54   ` zhong jiang
2019-10-31 15:49     ` Borislav Petkov
2019-10-31 15:54       ` zhong jiang
2019-11-01  8:45         ` Borislav Petkov
2019-11-01 15:32           ` zhong jiang
2019-11-01 16:03             ` Borislav Petkov

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).