Skip to contentSkip to conversation

staging: fbtft: remove trailing semicolons from macro [email protected]

PATCH In review Comfort Oyewole 4 participants 5 messages Oct 18 – Oct 19

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

PATCH v2 1/1 staging: fbtft: remove trailing semicolons from macro [email protected]

Remove trailing semicolons from macro definitions to allow the macros to be used where callers provide their own trailing semicolon. Also confirmed that all current uses of these macros already include their own semicolons.

---
Changes in v2:
- Confirmed that all current uses of these macros already include their own semicolons

 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
kernel test robot noticed the following build errors:

Hi Comfort,

kernel test robot noticed the following build errors:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/Comfort-Oyewole/staging-fbtft-remove-trailing-semicolons-from-macro-definitionsandy-kernel-org/20261018-185028
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/atUG5LbCbePRNn5M%40ubuntu
patch subject: [PATCH v2] staging: fbtft: remove trailing semicolons from macro [email protected]
config: sh-randconfig-1001-20261019 (https://download.01.org/0day-ci/archive/20261019/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All error/warnings (new ones prefixed by >>):

     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:302:18: error: 'fbtft_driver_probe_spi' undeclared here (not in a function); did you mean 'fbtft_driver_remove_spi'?
     302 |         .probe = fbtft_driver_probe_spi,                                        \
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from include/linux/acpi.h:15,
                    from include/linux/i2c.h:13,
                    from include/uapi/linux/fb.h:6,
                    from include/linux/fb.h:5,
                    from drivers/staging/fbtft/fbtft.h:7:
   include/linux/device/driver.h:267:1: error: expected ',' or ';' before 'static'
     267 | static int __init __driver##_init(void) \
         | ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c: In function '__inittest':
   drivers/staging/fbtft/fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared (first use in this function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:19: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compiler_types.h:88,
                    from <command-line>:
   drivers/staging/fbtft/fb_sh1106.c: At top level:
   drivers/staging/fbtft/fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared here (not in a function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:92:65: note: in definition of macro '__copy'
      92 | # define __copy(symbol)                 __attribute__((__copy__(symbol)))
         |                                                                 ^~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:134:13: error: 'init_module' aliased to undefined symbol 'fbtft_driver_spi_driver_init'
     134 |         int init_module(void) __copy(initfn)                    \
         |             ^~~~~~~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:247:17: error: '__mod_device_table__kmod_fb_sh1106__spi__spi_ids' aliased to undefined symbol 'spi_ids'
     247 |         __PASTE(__mod_device_table__,   \
         |                 ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:15:24: note: in definition of macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   include/linux/module.h:247:9: note: in expansion of macro '__PASTE'
     247 |         __PASTE(__mod_device_table__,   \
         |         ^~~~~~~
   include/linux/module.h:256:21: note: in expansion of macro '__mod_device_table'
     256 | static typeof(name) __mod_device_table(type, name)                      \
         |                     ^~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:364:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
     364 | MODULE_DEVICE_TABLE(spi, spi_ids)                                               \
         | ^~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/fbtft/fb_sh1106.c:154:29: warning: 'display' defined but not used [-Wunused-variable]
     154 | static struct fbtft_display display = {
         |                             ^~~~~~~
--
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:302:18: error: 'fbtft_driver_probe_spi' undeclared here (not in a function); did you mean 'fbtft_driver_remove_spi'?
     302 |         .probe = fbtft_driver_probe_spi,                                        \
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from include/linux/acpi.h:15,
                    from include/linux/i2c.h:13,
                    from include/uapi/linux/fb.h:6,
                    from include/linux/fb.h:5,
                    from fbtft.h:7:
   include/linux/device/driver.h:267:1: error: expected ',' or ';' before 'static'
     267 | static int __init __driver##_init(void) \
         | ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fb_sh1106.c: In function '__inittest':
   fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared (first use in this function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:368:19: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compiler_types.h:88,
                    from <command-line>:
   fb_sh1106.c: At top level:
   fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared here (not in a function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:92:65: note: in definition of macro '__copy'
      92 | # define __copy(symbol)                 __attribute__((__copy__(symbol)))
         |                                                                 ^~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:134:13: error: 'init_module' aliased to undefined symbol 'fbtft_driver_spi_driver_init'
     134 |         int init_module(void) __copy(initfn)                    \
         |             ^~~~~~~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:247:17: error: '__mod_device_table__kmod_fb_sh1106__spi__spi_ids' aliased to undefined symbol 'spi_ids'
     247 |         __PASTE(__mod_device_table__,   \
         |                 ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:15:24: note: in definition of macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   include/linux/module.h:247:9: note: in expansion of macro '__PASTE'
     247 |         __PASTE(__mod_device_table__,   \
         |         ^~~~~~~
   include/linux/module.h:256:21: note: in expansion of macro '__mod_device_table'
     256 | static typeof(name) __mod_device_table(type, name)                      \
         |                     ^~~~~~~~~~~~~~~~~~
   fbtft.h:364:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
     364 | MODULE_DEVICE_TABLE(spi, spi_ids)                                               \
         | ^~~~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fb_sh1106.c:154:29: warning: 'display' defined but not used [-Wunused-variable]
     154 | static struct fbtft_display display = {
         |                             ^~~~~~~

vim +247 include/linux/module.h

^1da177e4c3f415 Linus Torvalds 2005-04-16  240  
83fb49389bbe07d Alexey Gladkov 2025-09-18  241  /*
83fb49389bbe07d Alexey Gladkov 2025-09-18  242   * Format: __mod_device_table__kmod_<modname>__<type>__<name>
83fb49389bbe07d Alexey Gladkov 2025-09-18  243   * Parts of the string `__kmod_` and `__` are used as delimiters when parsing
83fb49389bbe07d Alexey Gladkov 2025-09-18  244   * a symbol in file2alias.c
83fb49389bbe07d Alexey Gladkov 2025-09-18  245   */
83fb49389bbe07d Alexey Gladkov 2025-09-18  246  #define __mod_device_table(type, name)	\
83fb49389bbe07d Alexey Gladkov 2025-09-18 @247  	__PASTE(__mod_device_table__,	\
9025688bf6d427e Josh Poimboeuf 2025-10-20  248  	__PASTE(kmod_,			\
83fb49389bbe07d Alexey Gladkov 2025-09-18  249  	__PASTE(__KBUILD_MODNAME,	\
83fb49389bbe07d Alexey Gladkov 2025-09-18  250  	__PASTE(__,			\
83fb49389bbe07d Alexey Gladkov 2025-09-18  251  	__PASTE(type,			\
9025688bf6d427e Josh Poimboeuf 2025-10-20  252  	__PASTE(__, name))))))

83fb49389bbe07d Alexey Gladkov 2025-09-18 253

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#2 lore raw
Quoted 6 lines · kernel test robot

Hi Comfort,

kernel test robot noticed the following build errors:

[auto build test ERROR on staging/staging-testing]

Quoted 7 lines
url:    https://github.com/intel-lab-lkp/linux/commits/Comfort-Oyewole/staging-fbtft-remove-trailing-semicolons-from-macro-definitionsandy-kernel-org/20261018-185028
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/atUG5LbCbePRNn5M%40ubuntu
patch subject: [PATCH v2] staging: fbtft: remove trailing semicolons from macro [email protected]
config: sh-randconfig-1001-20261019 (https://download.01.org/0day-ci/archive/20261019/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/[email protected]/reproduce)

Comfort,

Did you compile your kernel? You need to check that you get a .o file for every files that you modify. But that is not a 100% guarantee, when the change you make are under an #ifdef. In that case, you have to check that the containing #ifdefs resolve to true so the code is compiled. If it seems complex, you can try adding an error at the point of the code you modified to be sure that compiling gives the corresponding error message.

julia

Quoted 274 lines

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All error/warnings (new ones prefixed by >>):

     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:302:18: error: 'fbtft_driver_probe_spi' undeclared here (not in a function); did you mean 'fbtft_driver_remove_spi'?
     302 |         .probe = fbtft_driver_probe_spi,                                        \
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from include/linux/acpi.h:15,
                    from include/linux/i2c.h:13,
                    from include/uapi/linux/fb.h:6,
                    from include/linux/fb.h:5,
                    from drivers/staging/fbtft/fbtft.h:7:
   include/linux/device/driver.h:267:1: error: expected ',' or ';' before 'static'
     267 | static int __init __driver##_init(void) \
         | ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c: In function '__inittest':
   drivers/staging/fbtft/fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared (first use in this function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:19: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compiler_types.h:88,
                    from <command-line>:
   drivers/staging/fbtft/fb_sh1106.c: At top level:
   drivers/staging/fbtft/fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared here (not in a function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:92:65: note: in definition of macro '__copy'
      92 | # define __copy(symbol)                 __attribute__((__copy__(symbol)))
         |                                                                 ^~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:134:13: error: 'init_module' aliased to undefined symbol 'fbtft_driver_spi_driver_init'
     134 |         int init_module(void) __copy(initfn)                    \
         |             ^~~~~~~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 1 line
Quoted 1 line

include/linux/module.h:247:17: error: '__mod_device_table__kmod_fb_sh1106__spi__spi_ids' aliased to undefined symbol 'spi_ids'

     247 |         __PASTE(__mod_device_table__,   \
         |                 ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:15:24: note: in definition of macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   include/linux/module.h:247:9: note: in expansion of macro '__PASTE'
     247 |         __PASTE(__mod_device_table__,   \
         |         ^~~~~~~
   include/linux/module.h:256:21: note: in expansion of macro '__mod_device_table'
     256 | static typeof(name) __mod_device_table(type, name)                      \
         |                     ^~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fbtft.h:364:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
     364 | MODULE_DEVICE_TABLE(spi, spi_ids)                                               \
         | ^~~~~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 1 line
Quoted 1 line

drivers/staging/fbtft/fb_sh1106.c:154:29: warning: 'display' defined but not used [-Wunused-variable]

     154 | static struct fbtft_display display = {
         |                             ^~~~~~~
--
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:302:18: error: 'fbtft_driver_probe_spi' undeclared here (not in a function); did you mean 'fbtft_driver_remove_spi'?
     302 |         .probe = fbtft_driver_probe_spi,                                        \
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:366:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     366 | FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)            \
         | ^~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from include/linux/acpi.h:15,
                    from include/linux/i2c.h:13,
                    from include/uapi/linux/fb.h:6,
                    from include/linux/fb.h:5,
                    from fbtft.h:7:
   include/linux/device/driver.h:267:1: error: expected ',' or ';' before 'static'
     267 | static int __init __driver##_init(void) \
         | ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fb_sh1106.c: In function '__inittest':
   fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared (first use in this function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fbtft.h:368:19: note: each undeclared identifier is reported only once for each function it appears in
   include/linux/module.h:133:18: note: in definition of macro 'module_init'
     133 |         { return initfn; }                                      \
         |                  ^~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/compiler_types.h:88,
                    from <command-line>:
   fb_sh1106.c: At top level:
   fbtft.h:368:19: error: 'fbtft_driver_spi_driver_init' undeclared here (not in a function); did you mean 'fbtft_driver_spi_driver'?
     368 | module_spi_driver(fbtft_driver_spi_driver)
         |                   ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:92:65: note: in definition of macro '__copy'
      92 | # define __copy(symbol)                 __attribute__((__copy__(symbol)))
         |                                                                 ^~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/module.h:134:13: error: 'init_module' aliased to undefined symbol 'fbtft_driver_spi_driver_init'
     134 |         int init_module(void) __copy(initfn)                    \
         |             ^~~~~~~~~~~
   include/linux/device/driver.h:271:1: note: in expansion of macro 'module_init'
     271 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:408:9: note: in expansion of macro 'module_driver'
     408 |         module_driver(__spi_driver, spi_register_driver, \
         |         ^~~~~~~~~~~~~
   fbtft.h:368:1: note: in expansion of macro 'module_spi_driver'
     368 | module_spi_driver(fbtft_driver_spi_driver)
         | ^~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 1 line
Quoted 1 line

include/linux/module.h:247:17: error: '__mod_device_table__kmod_fb_sh1106__spi__spi_ids' aliased to undefined symbol 'spi_ids'

     247 |         __PASTE(__mod_device_table__,   \
         |                 ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:15:24: note: in definition of macro '___PASTE'
      15 | #define ___PASTE(a, b) a##b
         |                        ^
   include/linux/module.h:247:9: note: in expansion of macro '__PASTE'
     247 |         __PASTE(__mod_device_table__,   \
         |         ^~~~~~~
   include/linux/module.h:256:21: note: in expansion of macro '__mod_device_table'
     256 | static typeof(name) __mod_device_table(type, name)                      \
         |                     ^~~~~~~~~~~~~~~~~~
   fbtft.h:364:1: note: in expansion of macro 'MODULE_DEVICE_TABLE'
     364 | MODULE_DEVICE_TABLE(spi, spi_ids)                                               \
         | ^~~~~~~~~~~~~~~~~~~
   fb_sh1106.c:173:1: note: in expansion of macro 'FBTFT_REGISTER_SPI_DRIVER'
     173 | FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "sinowealth", "sh1106", &display);
         | ^~~~~~~~~~~~~~~~~~~~~~~~~
   fb_sh1106.c:154:29: warning: 'display' defined but not used [-Wunused-variable]
     154 | static struct fbtft_display display = {
         |                             ^~~~~~~

vim +247 include/linux/module.h

^1da177e4c3f415 Linus Torvalds 2005-04-16  240
83fb49389bbe07d Alexey Gladkov 2025-09-18  241  /*
83fb49389bbe07d Alexey Gladkov 2025-09-18  242   * Format: __mod_device_table__kmod_<modname>__<type>__<name>
83fb49389bbe07d Alexey Gladkov 2025-09-18  243   * Parts of the string `__kmod_` and `__` are used as delimiters when parsing
83fb49389bbe07d Alexey Gladkov 2025-09-18  244   * a symbol in file2alias.c
83fb49389bbe07d Alexey Gladkov 2025-09-18  245   */
83fb49389bbe07d Alexey Gladkov 2025-09-18  246  #define __mod_device_table(type, name)	\
83fb49389bbe07d Alexey Gladkov 2025-09-18 @247  	__PASTE(__mod_device_table__,	\
9025688bf6d427e Josh Poimboeuf 2025-10-20  248  	__PASTE(kmod_,			\
83fb49389bbe07d Alexey Gladkov 2025-09-18  249  	__PASTE(__KBUILD_MODNAME,	\
83fb49389bbe07d Alexey Gladkov 2025-09-18  250  	__PASTE(__,			\
83fb49389bbe07d Alexey Gladkov 2025-09-18  251  	__PASTE(type,			\
9025688bf6d427e Josh Poimboeuf 2025-10-20  252  	__PASTE(__, name))))))

83fb49389bbe07d Alexey Gladkov 2025-09-18 253

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#3 lore raw
In reply to Comfort Oyewole
kernel test robot noticed the following build errors:

Hi Comfort,

kernel test robot noticed the following build errors:

[auto build test ERROR on staging/staging-testing]

url:    https://github.com/intel-lab-lkp/linux/commits/Comfort-Oyewole/staging-fbtft-remove-trailing-semicolons-from-macro-definitionsandy-kernel-org/20261018-185028
base:   staging/staging-testing
patch link:    https://lore.kernel.org/r/atUG5LbCbePRNn5M%40ubuntu
patch subject: [PATCH v2] staging: fbtft: remove trailing semicolons from macro [email protected]
config: arm64-randconfig-1003-20261019 (https://download.01.org/0day-ci/archive/20261019/[email protected]/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6719b9e31d6a93099612c474eec76d9f41d0275a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/staging/fbtft/fb_uc1611.c:325:1: error: expected ';' after top level declarator
     325 | FBTFT_REGISTER_DRIVER(DRVNAME, "ultrachip,uc1611", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_uc1611.c:325:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_ili9320.c:256:1: error: expected ';' after top level declarator
     256 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_ili9320.c:256:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_upd161704.c:175:1: error: expected ';' after top level declarator
     175 | FBTFT_REGISTER_DRIVER(DRVNAME, "nec,upd161704", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_upd161704.c:175:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_hx8347d.c:174:1: error: expected ';' after top level declarator
     174 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_hx8347d.c:174:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_ssd1331.c:193:1: error: expected ';' after top level declarator
     193 | FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1331", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_ssd1331.c:193:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_tinylcd.c:84:1: error: expected ';' after top level declarator
      84 | FBTFT_REGISTER_DRIVER(DRVNAME, "neosec,tinylcd", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_tinylcd.c:84:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_ili9163.c:251:1: error: expected ';' after top level declarator
     251 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9163", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_ili9163.c:251:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_ssd1351.c:230:1: error: expected ';' after top level declarator
     230 | FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1351", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_ssd1351.c:230:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_hx8353d.c:126:1: error: expected ';' after top level declarator
     126 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_hx8353d.c:126:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_ssd1305.c:198:1: error: expected ';' after top level declarator
     198 | FBTFT_REGISTER_DRIVER(DRVNAME, "solomon,ssd1305", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_ssd1305.c:198:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^
   2 errors generated.
--
>> drivers/staging/fbtft/fb_st7735r.c:165:1: error: expected ';' after top level declarator
     165 | FBTFT_REGISTER_DRIVER(DRVNAME, "sitronix,st7735r", &display);
         | ^
   drivers/staging/fbtft/fbtft.h:321:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     321 |                                                                            \
         |                                                                            ^
   drivers/staging/fbtft/fbtft.h:283:11: note: expanded from macro '\
   FBTFT_SPI_DRIVER'
     283 |                                                                                 \
         |                                                                                 ^
>> drivers/staging/fbtft/fb_st7735r.c:165:1: error: expected ';' after top level declarator
   drivers/staging/fbtft/fbtft.h:323:13: note: expanded from macro 'FBTFT_REGISTER_DRIVER'
     323 |                                                                            \
         |                                                                            ^

2 errors generated.
..

vim +325 drivers/staging/fbtft/fb_uc1611.c

a1560f9bec8b927 Henri Chain 2015-07-14 324
a1560f9bec8b927 Henri Chain 2015-07-14 @325 FBTFT_REGISTER_DRIVER(DRVNAME, "ultrachip,uc1611", &display); a1560f9bec8b927 Henri Chain 2015-07-14 326

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

#4 lore raw
In reply to Comfort Oyewole
Quoted 4 lines · Comfort Oyewole

Remove trailing semicolons from macro definitions to allow the macros to be used where callers provide their own trailing semicolon. Also confirmed that all current uses of these macros already include their own semicolons.

Yeah, it's v2 and you have still failed to even compile it. Don't bother.

Signature · 2 lines
With Best Regards,
Andy Shevchenko