[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ff3592ac-2dd0-f92d-fc75-cdb4f9761753@wanadoo.fr>
Date: Sat, 21 Aug 2021 06:55:43 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: CGEL <cgel.zte@...il.com>, inux-ia64@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
jing yangyang <jing.yangyang@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] ia64/kernel/iosapic: replace a printk +
WARN_ON() to a WARN()
Hi,
beside the fact that your patch seems to change the log level from ERR
to WARN, have you compile tested your change?
You are still using WARN_ON, which takes only 1 parameter.
CJ
Le 21/08/2021 à 05:44, CGEL a écrit :
> From: jing yangyang <jing.yangyang@....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@....com.cn>
> Signed-off-by: jing yangyang <jing.yangyang@....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;
> }
>
>
Powered by blists - more mailing lists