Skip to contentSkip to conversation

staging: fbtft: remove unused argument from FBTFT_SPI_DRIVER()

PATCH In review Aditya Nagar 2 participants 3 messages Oct 25

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fbtft: remove unused argument from FBTFT_SPI_DRIVER()

The _compatible argument of FBTFT_SPI_DRIVER() is never used in the macro body. The device tree match table is created separately by FBTFT_DT_TABLE() in both callers, FBTFT_REGISTER_DRIVER() and FBTFT_REGISTER_SPI_DRIVER().

Drop the argument and update both callers. No functional change.

The argument has been unused since the macro was introduced in commit c222ea5d2f33 ("staging: fbtft: Deduplicate driver registration macros").

Found with checkpatch.pl (MACRO_ARG_UNUSED). The change was prepared with the help of an AI coding assistant (Claude); I reviewed it and build-tested all fbtft drivers with W=1.

---
 drivers/staging/fbtft/fbtft.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/fbtft/fbtft.h +3 -3
index 40a7567df..62d5c39d7 100644
@@ -279,7 +279,7 @@ static const struct of_device_id dt_ids[] = {					\
 };										\
 MODULE_DEVICE_TABLE(of, dt_ids);
 
-#define FBTFT_SPI_DRIVER(_name, _compatible, _display, _spi_ids)		\
+#define FBTFT_SPI_DRIVER(_name, _display, _spi_ids)				\
 										\
 static int fbtft_driver_probe_spi(struct spi_device *spi)			\
 {										\
@@ -319,7 +319,7 @@ static void fbtft_driver_remove_pdev(struct platform_device *pdev)	   \
 									   \
 FBTFT_DT_TABLE(_compatible)						   \
 									   \
-FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)			   \
+FBTFT_SPI_DRIVER(_name, _display, NULL)					   \
 									   \
 static struct platform_driver fbtft_driver_platform_driver = {             \
 	.driver = {                                                        \
@@ -363,7 +363,7 @@ static const struct spi_device_id spi_ids[] = {					\
 };										\
 MODULE_DEVICE_TABLE(spi, spi_ids);						\
 										\
-FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)		\
+FBTFT_SPI_DRIVER(_name, _display, spi_ids)					\
 										\
 module_spi_driver(fbtft_driver_spi_driver);
 

base-commit: 4a177d5e688e8e82113f7a32d6f75f0bab9658c4

Signature · 1 line
2.56.0
#1 lore raw
Quoted 7 lines · Aditya Nagar

The _compatible argument of FBTFT_SPI_DRIVER() is never used in the macro body. The device tree match table is created separately by FBTFT_DT_TABLE() in both callers, FBTFT_REGISTER_DRIVER() and FBTFT_REGISTER_SPI_DRIVER().

Drop the argument and update both callers. No functional change.

Quoted 8 lines

The argument has been unused since the macro was introduced in commit c222ea5d2f33 ("staging: fbtft: Deduplicate driver registration macros").

Found with checkpatch.pl (MACRO_ARG_UNUSED). The change was prepared with the help of an AI coding assistant (Claude); I reviewed it and build-tested all fbtft drivers with W=1.

Sorry, but please read:

	https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh
#2 lore raw

Hi Greg,

Thanks for the explanation, understood the message and I apologise.

Thanks,
Aditya

Quoted 20 lines · Greg Kroah-Hartman
Quoted 7 lines · Aditya Nagar

The _compatible argument of FBTFT_SPI_DRIVER() is never used in the macro body. The device tree match table is created separately by FBTFT_DT_TABLE() in both callers, FBTFT_REGISTER_DRIVER() and FBTFT_REGISTER_SPI_DRIVER().

Drop the argument and update both callers. No functional change.

Quoted 8 lines

The argument has been unused since the macro was introduced in commit c222ea5d2f33 ("staging: fbtft: Deduplicate driver registration macros").

Found with checkpatch.pl (MACRO_ARG_UNUSED). The change was prepared with the help of an AI coding assistant (Claude); I reviewed it and build-tested all fbtft drivers with W=1.

Sorry, but please read:

        https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh