Re: [PATCH] genirq/debugfs: Print irqdomain flags as human-readable strings

From: Thomas Gleixner
Date: Wed May 29 2024 - 04:19:30 EST


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