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

Andy Shevchenko
2023-11-30T13:37:57Z

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.

--
With Best Regards,
Andy Shevchenko