mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: Fix line length warning
@ 2026-10-24 18:08 himanshu bakshi
  2026-10-25 15:01 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: himanshu bakshi @ 2026-10-24 18:08 UTC (permalink / raw)
  To: andy
  Cc: gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel,
	Himanshu Bakshi

From: Himanshu Bakshi <himanshu.bakshi478@gmail.com>

Split the line in fbtft_init_dbg macro to keep it within the limit of 100
columns and address the check-patch warning.

Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@gmail.com>
---
 drivers/staging/fbtft/fbtft.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index c7afb0fd3943..fd7f8fc2afba 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -424,7 +424,8 @@ module_spi_driver(fbtft_driver_spi_driver);
 #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)
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: fbtft: Fix line length warning
  2026-10-24 18:08 [PATCH] staging: fbtft: Fix line length warning himanshu bakshi
@ 2026-10-25 15:01 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2026-10-25 15:01 UTC (permalink / raw)
  To: himanshu bakshi
  Cc: andy, gregkh, dri-devel, linux-fbdev, linux-staging, linux-kernel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-25 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24 18:08 [PATCH] staging: fbtft: Fix line length warning himanshu bakshi
2026-10-25 15:01 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®