linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] x86:iormap: replace a printk + WARN_ON_ONCE() to a WARN_ONCE() Replace a printk+WARN_ON() by a WARN(); this increases the chance of the string making it into the bugreport.
@ 2021-08-20  6:04 CGEL
  0 siblings, 0 replies; only message in thread
From: CGEL @ 2021-08-20  6:04 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Andy Lutomirski, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, H . Peter Anvin, linux-kernel,
	jing yangyang, Zeal Robot

From: jing yangyang <jing.yangyang@zte.com.cn>

This issue was detected with the help of Coccinelle.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 arch/x86/mm/ioremap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 60ade7d..f2ded4a 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -195,9 +195,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",
+		WARN_ONCE(1, "ioremap: invalid physical address %llx\n",
 		       (unsigned long long)phys_addr);
-		WARN_ON_ONCE(1);
 		return NULL;
 	}
 
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-20  6:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  6:04 [PATCH linux-next] x86:iormap: replace a printk + WARN_ON_ONCE() to a WARN_ONCE() Replace a printk+WARN_ON() by a WARN(); this increases the chance of the string making it into the bugreport CGEL

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