On Sat, Oct 24, 2026 at 11:38:03PM +0530, himanshu bakshi wrote:
> 
> Split the line in fbtft_init_dbg macro to keep it within the limit of 100
> columns and address the check-patch warning.

checkpatch
(in one word)

...

>  #define fbtft_init_dbg(dev, format, arg...)                  \
>  do {                                                         \
>       if (unlikely((dev)->platform_data &&                 \
> -         (((struct fbtft_platform_data 
> *)(dev)->platform_data)->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
> +         (((struct fbtft_platform_data *)(dev)->platform_data)-> \
> +         display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
>               dev_info(dev, format, ##arg);                \
>  } while (0)

First of all, make sure that \ (backslashes) occupy the same column on each
line of this macro. Next one, it's better to add a temporary variable to
hold the platform data pointer. Something like

        struct fbtft_platform_data *__pd = dev_get_platdata(dev);           \
                                                                            \
        if (unlikely(pd && pd->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS) \
                dev_info(dev, format, ##arg);                               \

And last, but not least, have you checked with `git grep` how it's being used?

-- 
With Best Regards,
Andy Shevchenko


Reply via email to