Re: [PATCH v3 8/8] gpiolib: use %*pb format specifier when printing array masks
From: Linus Walleij
Date: Fri Nov 06 2026 - 09:12:34 EST
On Fri, Nov 6, 2026 at 7:30 AM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:
> In gpiod_get_array(), the dev_dbg() statement prints get_mask, set_mask,
> and invert_mask using %lx after dereferencing them as raw unsigned long
> pointers. This truncates masks wider than BITS_PER_LONG to their first
> word and relies on the raw unsigned long pointer representation of
> bitmaps.
>
> Switch to the %*pb format specifier, passing the mask size and pointer
> for each mask.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij