Skip to contentSkip to conversation

staging: fbtft: remove trailing semicolons from macro definitions

PATCH Superseded Comfort Oyewole 3 participants 3 messages Oct 18 – Oct 19

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fbtft: remove trailing semicolons from macro definitions

Remove trailing semicolons from macro definitions to allow the macros to be used where callers provide their own trailing semicolon

---
 drivers/staging/fbtft/fbtft.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/fbtft/fbtft.h +6 -6
index 40a7567df1eb..1ab1658e8321 100644
@@ -277,7 +277,7 @@ static const struct of_device_id dt_ids[] = {					\
 	{ .compatible = _compatible },						\
 	{},									\
 };										\
-MODULE_DEVICE_TABLE(of, dt_ids);
+MODULE_DEVICE_TABLE(of, dt_ids)
 
 #define FBTFT_SPI_DRIVER(_name, _compatible, _display, _spi_ids)		\
 										\
@@ -301,7 +301,7 @@ static struct spi_driver fbtft_driver_spi_driver = {				\
 	.id_table = _spi_ids,							\
 	.probe = fbtft_driver_probe_spi,					\
 	.remove = fbtft_driver_remove_spi,					\
-};
+}
 
 #define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)                \
 									   \
@@ -350,8 +350,8 @@ static void __exit fbtft_driver_module_exit(void)                          \
 	platform_driver_unregister(&fbtft_driver_platform_driver);         \
 }                                                                          \
 									   \
-module_init(fbtft_driver_module_init);                                     \
-module_exit(fbtft_driver_module_exit);
+module_init(fbtft_driver_module_init)                                     \
+module_exit(fbtft_driver_module_exit)
 
 #define FBTFT_REGISTER_SPI_DRIVER(_name, _comp_vend, _comp_dev, _display)	\
 										\
@@ -361,11 +361,11 @@ static const struct spi_device_id spi_ids[] = {					\
 	{ .name = _comp_dev },							\
 	{},									\
 };										\
-MODULE_DEVICE_TABLE(spi, spi_ids);						\
+MODULE_DEVICE_TABLE(spi, spi_ids)						\
 										\
 FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)		\
 										\
-module_spi_driver(fbtft_driver_spi_driver);
+module_spi_driver(fbtft_driver_spi_driver)
 
 /* Debug macros */
 
Signature · 1 line
2.53.0
#1 lore raw
Quoted 6 lines · Comfort Oyewole

Remove trailing semicolons from macro definitions to allow the macros to be used where callers provide their own trailing semicolon

It would be good for the log message to indicate that you have checked that the existing usage sites include their semicolons.

Quoted 57 lines

---
drivers/staging/fbtft/fbtft.h | 12 ++++++------

1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/fbtft/fbtft.h +6 -7
index 40a7567df1eb..1ab1658e8321 100644
@@ -277,7 +277,7 @@ static const struct of_device_id dt_ids[] = {                    \
   { .compatible = _compatible },                        \
   {},                                    \
 };                                        \
-MODULE_DEVICE_TABLE(of, dt_ids);
+MODULE_DEVICE_TABLE(of, dt_ids)
 
 #define FBTFT_SPI_DRIVER(_name, _compatible, _display, _spi_ids)        \
                                       \
@@ -301,7 +301,7 @@ static struct spi_driver fbtft_driver_spi_driver = {                \
   .id_table = _spi_ids,                            \
   .probe = fbtft_driver_probe_spi,                    \
   .remove = fbtft_driver_remove_spi,                    \
-};
+}
 
 #define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)                \
                                      \
@@ -350,8 +350,8 @@ static void __exit fbtft_driver_module_exit(void)                          \
   platform_driver_unregister(&fbtft_driver_platform_driver);         \
 }                                                                          \
                                      \
-module_init(fbtft_driver_module_init);                                     \
-module_exit(fbtft_driver_module_exit);
+module_init(fbtft_driver_module_init)                                     \
+module_exit(fbtft_driver_module_exit)
 
 #define FBTFT_REGISTER_SPI_DRIVER(_name, _comp_vend, _comp_dev, _display)    \
                                       \
@@ -361,11 +361,11 @@ static const struct spi_device_id spi_ids[] = {                    \
   { .name = _comp_dev },                            \
   {},                                    \
 };                                        \
-MODULE_DEVICE_TABLE(spi, spi_ids);                        \
+MODULE_DEVICE_TABLE(spi, spi_ids)                        \
                                       \
 FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)        \
                                       \
-module_spi_driver(fbtft_driver_spi_driver);
+module_spi_driver(fbtft_driver_spi_driver)
 
 /* Debug macros */
 
--

2.53.0

#2 lore raw
In reply to Comfort Oyewole
Quoted 3 lines · Comfort Oyewole

Remove trailing semicolons from macro definitions to allow the macros to be used where callers provide their own trailing semicolon

This doesn't match what the patch does. I'm surprised that this code compiles with all the semi-colons removed, honestly. :P

regards,
dan carpenter