Re: [PATCH] gpio: sim: implement the dbg_show() callback

Bartosz Golaszewski
2023-11-30T14:09:29Z

On Thu, Nov 30, 2023 at 2:37 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Thu, Nov 30, 2023 at 11:40:23AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > Provide a custom implementation of the dbg_show() callback that prints
> > all requested lines together with their label, direction, value and
> > bias. This improves the code coverage of GPIOLIB.
>
> ...
>
> > +#else
> > +#define gpio_sim_dbg_show NULL
> > +#endif /* CONFIG_DEBUG_FS */
>
> I;m wondering if you can use PTR_IF() instead of this ugly ifdeffery.
>

I wasn't aware of this. Thanks for bringing it to my attention, I'll use it.

Bart

> --
> With Best Regards,
> Andy Shevchenko
>
>