[PATCH v2] staging: fbtft: Fix line length warning

From: himanshu bakshi

Date: Sun Oct 25 2026 - 12:40:52 EST


From: Himanshu Bakshi <himanshu.bakshi478@xxxxxxxxx>

Hi Andy,

I have made sure that the \ (backslash) is properly aligned to the same
column as the rest of the macro. I have also taken into account your
advice and hence added a local variable for platform data.

After some thorough searching through the respective directory, I have
not found any calls for fbtft_init_dbg. This might be because it's a
helper macro that might be useful as the driver progresses.

I have also noticed that some other macros around this one have simple
style issues and if you would like, I can send another different patch
cleaning up those too.

I have also done minimal testing by using the macro once to make sure it
compiles and has no errors, if you would like, I can also run any
standalone tests for this macro.

Thanks and Regards,
Himanshu Bakshi

Signed-off-by: Himanshu Bakshi <himanshu.bakshi478@xxxxxxxxx>
---
drivers/staging/fbtft/fbtft.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index fd7f8fc2afba..ceaa9a3906ef 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -421,12 +421,11 @@ module_spi_driver(fbtft_driver_spi_driver);
#define DEBUG_REQUEST_GPIOS_MATCH BIT(30)
#define DEBUG_VERIFY_GPIOS BIT(31)

-#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))) \
- dev_info(dev, format, ##arg); \
+#define fbtft_init_dbg(dev, format, arg...) \
+do { \
+ struct fbtft_platform_data *pdata = dev_get_platdata((dev)); \
+ if (unlikely(pdata && (pdata->display.debug & DEBUG_DRIVER_INIT_FUNCTIONS))) \
+ dev_info(dev, format, ##arg); \
} while (0)

#define fbtft_par_dbg(level, par, format, arg...) \
--
2.56.0