lkml.org 
[lkml]   [2021]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] ia64/kernel/iosapic: replace a printk + WARN_ON() to a WARN()
Date
From: jing yangyang <jing.yangyang@zte.com.cn>

Replace a printk+WARN_ON() by a WARN(); this increases the chance of
the string making it into the bugreport

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/ia64/kernel/iosapic.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index 35adcf8..cb8ba1c 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -794,17 +794,13 @@ static inline unsigned char choose_dmode(void)
*/
irq = gsi_to_irq(gsi);
if (irq < 0) {
- printk(KERN_ERR "iosapic_unregister_intr(%u) unbalanced\n",
- gsi);
- WARN_ON(1);
+ WARN_ON(1, "iosapic_unregister_intr(%u) unbalanced\n", gsi);
return;
}

spin_lock_irqsave(&iosapic_lock, flags);
if ((rte = find_rte(irq, gsi)) == NULL) {
- printk(KERN_ERR "iosapic_unregister_intr(%u) unbalanced\n",
- gsi);
- WARN_ON(1);
+ WARN_ON(1, "iosapic_unregister_intr(%u) unbalanced\n", gsi);
goto out;
}

--
1.8.3.1

\
 
 \ /
  Last update: 2021-08-21 05:45    [W:0.097 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site