public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Chen Lifu <chenlifu@huawei.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] irq: print depth in __enable_irq WARNING
Date: Sun, 10 Apr 2022 21:40:24 +0200	[thread overview]
Message-ID: <87czhohglz.ffs@tglx> (raw)
In-Reply-To: <20220325013359.2691092-1-chenlifu@huawei.com>

Chen!

On Fri, Mar 25 2022 at 09:33, Chen Lifu wrote:

The subsystem prefix for the interrupt core is 'genirq' as you can easy
check via 'git log kernel/irq/manage.c'

> Since case 0 and 1 of desc->depth may print same warning messages as follows,
> according to the messages, we do not know in which case the warning is generated.
> This patch prints extra desc->depth in the warning messages to distinguish
> these cases.

This patch prints? The patch cannot print anything.

Please read the patch submission notes in Documentation/process/
including the tip tree specific rules in Documentation/process/maintainer-tip.html

>  void __enable_irq(struct irq_desc *desc)
>  {
>  	switch (desc->depth) {
>  	case 0:
>   err_out:
> -		WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n",
> -		     irq_desc_get_irq(desc));
> +		WARN(1, KERN_WARNING "depth %u: Unbalanced enable for IRQ %d\n",
> +		     desc->depth, irq_desc_get_irq(desc));

If we change this then we really want separate messages which makes it
clear what this is about. Something like:

        if (likely(depth == 1)) {
        	if (WARN_ONCE(suspended, "Enable of suspended irq %d", irq))
                	return;
                ....
                return;
        }

        if (WARN_ONCE(!depth, "Unbalanced enable of irq %d", irq))
        	return;

	desc->depth--;

Hmm?

Thanks,

        tglx

      reply	other threads:[~2022-04-10 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-25  1:33 [PATCH -next] irq: print depth in __enable_irq WARNING Chen Lifu
2022-04-10 19:40 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czhohglz.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=chenlifu@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox