[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xux9gy6.ffs@tglx>
Date: Wed, 29 May 2024 10:10:25 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Jinjie Ruan <ruanjinjie@...wei.com>, linux-kernel@...r.kernel.org
Cc: ruanjinjie@...wei.com
Subject: Re: [PATCH] genirq/debugfs: Print irqdomain flags as human-readable
strings
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
Powered by blists - more mailing lists