All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jinjie Ruan <ruanjinjie@huawei.com>, linux-kernel@vger.kernel.org
Cc: ruanjinjie@huawei.com
Subject: Re: [PATCH] genirq/debugfs: Print irqdomain flags as human-readable strings
Date: Wed, 29 May 2024 10:10:25 +0200	[thread overview]
Message-ID: <875xux9gy6.ffs@tglx> (raw)
In-Reply-To: <20240528090917.3624463-1-ruanjinjie@huawei.com>

On Tue, May 28 2024 at 09:09, Jinjie Ruan wrote:
> This patch improves the readability of irqdomain debugging information in

git grep 'This patch' Documentation/process/

> debugfs by printing the flags field of domain files as human-readable
> strings instead of a raw bitmask, which aligned with the existing style
> used for irqchip flags in the irq debug files.
>  
> +struct irq_bit_descr {
> +	unsigned int	mask;
> +	char		*name;
> +};
> +
> +#define BIT_MASK_DESCR(m)	{ .mask = m, .name = #m }
> +
> +static inline void irq_debug_show_bits(struct seq_file *m, int ind,
> +				       unsigned int state,
> +				       const struct irq_bit_descr *sd, int size)
> +{
> +	int i;
> +
> +	for (i = 0; i < size; i++, sd++) {
> +		if (state & sd->mask)
> +			seq_printf(m, "%*s%s\n", ind + 12, "", sd->name);
> +	}
> +}

There is no point to inline this. Just keep it in debugfs.c and remove
the static.

Thanks,

        tglx

      reply	other threads:[~2024-05-29  8:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28  9:09 [PATCH] genirq/debugfs: Print irqdomain flags as human-readable strings Jinjie Ruan
2024-05-29  8:10 ` 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=875xux9gy6.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ruanjinjie@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.