linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/mm: use WARN_ONCE
@ 2021-07-26 13:08 Jason Wang
  2021-07-26 20:20 ` Andy Lutomirski
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2021-07-26 13:08 UTC (permalink / raw)
  To: luto
  Cc: dave.hansen, peterz, tglx, mingo, bp, x86, hpa, linux-kernel, Jason Wang

printk + WARN_ON_ONCE can be just WARN_ONCE.

Signed-off-by: Jason Wang <wangborong@cdjrlc.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 60ade7dd71bd..3e57035ef9e3 100644
--- 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;
 	}
 
-- 
2.32.0


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

end of thread, other threads:[~2021-07-26 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 13:08 [PATCH] x86/mm: use WARN_ONCE Jason Wang
2021-07-26 20:20 ` Andy Lutomirski

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