All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-19 19:21 ` Ian Cowan
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-19 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: u.kleine-koenig, dri-devel, linux-fbdev, linux-staging, ian

Removed an unnecessary semicolon at the end of a macro call

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 drivers/staging/fbtft/fbtft.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 2c2b5f1c1df3..aa66760e1a9c 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -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)		\
 										\
-- 
2.32.0


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

* [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-19 19:21 ` Ian Cowan
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-19 19:21 UTC (permalink / raw)
  To: gregkh; +Cc: linux-fbdev, linux-staging, ian, dri-devel, u.kleine-koenig

Removed an unnecessary semicolon at the end of a macro call

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
 drivers/staging/fbtft/fbtft.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 2c2b5f1c1df3..aa66760e1a9c 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -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)		\
 										\
-- 
2.32.0


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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-19 19:21 ` Ian Cowan
@ 2022-04-20  1:32   ` kernel test robot
  -1 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-04-20  1:32 UTC (permalink / raw)
  To: Ian Cowan, gregkh
  Cc: kbuild-all, linux-fbdev, linux-staging, ian, dri-devel, u.kleine-koenig

Hi Ian,

Thank you for the patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Cowan/Staging-fbtft-Fix-style-problem-in-header/20220420-040428
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git bed6d200f8ca38e1ecbdd8fb7e0564884002abd1
config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20220420/202204200954.tbOBwAKP-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/77c04f63df8342cff035e42cda5606c2c87d33db
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ian-Cowan/Staging-fbtft-Fix-style-problem-in-header/20220420-040428
        git checkout 77c04f63df8342cff035e42cda5606c2c87d33db
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_bd663474.c:17:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_bd663474.c:162:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     162 | FBTFT_REGISTER_DRIVER(DRVNAME, "hitachi,bd663474", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_bd663474.c:162:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     162 | FBTFT_REGISTER_DRIVER(DRVNAME, "hitachi,bd663474", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8340bn.c:21:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8340bn.c:216:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     216 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8340bn", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8340bn.c:216:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     216 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8340bn", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8347d.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8347d.c:174:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     174 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8347d.c:174:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     174 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8353d.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:139:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     139 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:139:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     139 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8357d.c:18:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8357d.c:192:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     192 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8357d.c:192:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     192 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9163.c:17:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9163.c:251:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     251 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9163", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9163.c:251:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     251 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9163", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9320.c:14:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9320.c:258:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     258 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9320.c:258:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     258 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9325.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9325.c:252:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     252 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9325", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9325.c:252:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     252 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9325", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9340.c:14:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9340.c:130:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     130 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9340", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9340.c:130:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     130 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9340", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9341.c:20:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9341.c:148:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     148 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9341.c:148:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     148 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
..


vim +284 drivers/staging/fbtft/fbtft.h

c222ea5d2f3361 Uwe Kleine-König 2022-01-23  281  
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  282  #define FBTFT_SPI_DRIVER(_name, _compatible, _display, _spi_ids)		\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  283  										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31 @284  static int fbtft_driver_probe_spi(struct spi_device *spi)			\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  285  {										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  286  	return fbtft_probe_common(_display, spi, NULL);				\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  287  }										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  288  										\
a0386bba70934d Uwe Kleine-König 2022-01-23  289  static void fbtft_driver_remove_spi(struct spi_device *spi)			\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  290  {										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  291  	struct fb_info *info = spi_get_drvdata(spi);				\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  292  										\
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  293  	fbtft_remove_common(&spi->dev, info);					\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  294  }										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  295  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  296  static struct spi_driver fbtft_driver_spi_driver = {				\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  297  	.driver = {								\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  298  		.name = _name,							\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  299  		.of_match_table = dt_ids,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  300  	},									\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  301  	.id_table = _spi_ids,							\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23 @302  	.probe = fbtft_driver_probe_spi,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  303  	.remove = fbtft_driver_remove_spi,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  304  };
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  305  
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  306  #define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)                \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  307  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  308  static int fbtft_driver_probe_pdev(struct platform_device *pdev)           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  309  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  310  	return fbtft_probe_common(_display, NULL, pdev);                   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  311  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  312  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  313  static int fbtft_driver_remove_pdev(struct platform_device *pdev)          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  314  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  315  	struct fb_info *info = platform_get_drvdata(pdev);                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  316  									   \
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  317  	fbtft_remove_common(&pdev->dev, info);                             \
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  318  	return 0;                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  319  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  320  									   \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  321  FBTFT_DT_TABLE(_compatible)						   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  322  									   \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  323  FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)			   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  324  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  325  static struct platform_driver fbtft_driver_platform_driver = {             \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  326  	.driver = {                                                        \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  327  		.name   = _name,                                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  328  		.owner  = THIS_MODULE,                                     \
189f39ee6ac51d Andy Shevchenko  2019-11-20  329  		.of_match_table = dt_ids,                                  \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  330  	},                                                                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  331  	.probe  = fbtft_driver_probe_pdev,                                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  332  	.remove = fbtft_driver_remove_pdev,                                \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  333  };                                                                         \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  334  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  335  static int __init fbtft_driver_module_init(void)                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  336  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  337  	int ret;                                                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  338  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  339  	ret = spi_register_driver(&fbtft_driver_spi_driver);               \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  340  	if (ret < 0)                                                       \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  341  		return ret;                                                \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  342  	ret = platform_driver_register(&fbtft_driver_platform_driver);     \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  343  	if (ret < 0)                                                       \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  344  		spi_unregister_driver(&fbtft_driver_spi_driver);           \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  345  	return ret;                                                        \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  346  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  347  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  348  static void __exit fbtft_driver_module_exit(void)                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  349  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  350  	spi_unregister_driver(&fbtft_driver_spi_driver);                   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  351  	platform_driver_unregister(&fbtft_driver_platform_driver);         \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  352  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  353  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  354  module_init(fbtft_driver_module_init);                                     \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  355  module_exit(fbtft_driver_module_exit);
15e66fc72925a4 Heiner Kallweit  2021-12-01  356  
15e66fc72925a4 Heiner Kallweit  2021-12-01  357  #define FBTFT_REGISTER_SPI_DRIVER(_name, _comp_vend, _comp_dev, _display)	\
15e66fc72925a4 Heiner Kallweit  2021-12-01  358  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  359  FBTFT_DT_TABLE(_comp_vend "," _comp_dev)					\
15e66fc72925a4 Heiner Kallweit  2021-12-01  360  										\
15e66fc72925a4 Heiner Kallweit  2021-12-01 @361  static const struct spi_device_id spi_ids[] = {					\
15e66fc72925a4 Heiner Kallweit  2021-12-01  362  	{ .name = _comp_dev },							\
15e66fc72925a4 Heiner Kallweit  2021-12-01  363  	{},									\
15e66fc72925a4 Heiner Kallweit  2021-12-01  364  };										\
15e66fc72925a4 Heiner Kallweit  2021-12-01 @365  MODULE_DEVICE_TABLE(spi, spi_ids);						\
15e66fc72925a4 Heiner Kallweit  2021-12-01  366  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  367  FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)		\
15e66fc72925a4 Heiner Kallweit  2021-12-01  368  										\
15e66fc72925a4 Heiner Kallweit  2021-12-01  369  module_spi_driver(fbtft_driver_spi_driver);
c296d5f9957c03 Thomas Petazzoni 2014-12-31  370  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-20  1:32   ` kernel test robot
  0 siblings, 0 replies; 14+ messages in thread
From: kernel test robot @ 2022-04-20  1:32 UTC (permalink / raw)
  To: Ian Cowan, gregkh
  Cc: linux-fbdev, kbuild-all, linux-staging, dri-devel, ian, u.kleine-koenig

Hi Ian,

Thank you for the patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Ian-Cowan/Staging-fbtft-Fix-style-problem-in-header/20220420-040428
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git bed6d200f8ca38e1ecbdd8fb7e0564884002abd1
config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20220420/202204200954.tbOBwAKP-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/77c04f63df8342cff035e42cda5606c2c87d33db
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Ian-Cowan/Staging-fbtft-Fix-style-problem-in-header/20220420-040428
        git checkout 77c04f63df8342cff035e42cda5606c2c87d33db
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_bd663474.c:17:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_bd663474.c:162:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     162 | FBTFT_REGISTER_DRIVER(DRVNAME, "hitachi,bd663474", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_bd663474.c:162:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     162 | FBTFT_REGISTER_DRIVER(DRVNAME, "hitachi,bd663474", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8340bn.c:21:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8340bn.c:216:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     216 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8340bn", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8340bn.c:216:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     216 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8340bn", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8347d.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8347d.c:174:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     174 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8347d.c:174:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     174 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8347d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8353d.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:139:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     139 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8353d.c:139:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     139 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8353d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_hx8357d.c:18:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8357d.c:192:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     192 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_hx8357d.c:192:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     192 | FBTFT_REGISTER_DRIVER(DRVNAME, "himax,hx8357d", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9163.c:17:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9163.c:251:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     251 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9163", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9163.c:251:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     251 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9163", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9320.c:14:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9320.c:258:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     258 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9320.c:258:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     258 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9320", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9325.c:15:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9325.c:252:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     252 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9325", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9325.c:252:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     252 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9325", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9340.c:14:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9340.c:130:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     130 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9340", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9340.c:130:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     130 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9340", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/staging/fbtft/fb_ili9341.c:20:
>> drivers/staging/fbtft/fbtft.h:284:1: error: expected ',' or ';' before 'static'
     284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
         | ^~~~~~
   drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9341.c:148:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     148 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &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:323:1: note: in expansion of macro 'FBTFT_SPI_DRIVER'
     323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
         | ^~~~~~~~~~~~~~~~
   drivers/staging/fbtft/fb_ili9341.c:148:1: note: in expansion of macro 'FBTFT_REGISTER_DRIVER'
     148 | FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &display);
         | ^~~~~~~~~~~~~~~~~~~~~
..


vim +284 drivers/staging/fbtft/fbtft.h

c222ea5d2f3361 Uwe Kleine-König 2022-01-23  281  
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  282  #define FBTFT_SPI_DRIVER(_name, _compatible, _display, _spi_ids)		\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  283  										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31 @284  static int fbtft_driver_probe_spi(struct spi_device *spi)			\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  285  {										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  286  	return fbtft_probe_common(_display, spi, NULL);				\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  287  }										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  288  										\
a0386bba70934d Uwe Kleine-König 2022-01-23  289  static void fbtft_driver_remove_spi(struct spi_device *spi)			\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  290  {										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  291  	struct fb_info *info = spi_get_drvdata(spi);				\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  292  										\
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  293  	fbtft_remove_common(&spi->dev, info);					\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  294  }										\
c296d5f9957c03 Thomas Petazzoni 2014-12-31  295  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  296  static struct spi_driver fbtft_driver_spi_driver = {				\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  297  	.driver = {								\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  298  		.name = _name,							\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  299  		.of_match_table = dt_ids,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  300  	},									\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  301  	.id_table = _spi_ids,							\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23 @302  	.probe = fbtft_driver_probe_spi,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  303  	.remove = fbtft_driver_remove_spi,					\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  304  };
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  305  
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  306  #define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)                \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  307  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  308  static int fbtft_driver_probe_pdev(struct platform_device *pdev)           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  309  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  310  	return fbtft_probe_common(_display, NULL, pdev);                   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  311  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  312  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  313  static int fbtft_driver_remove_pdev(struct platform_device *pdev)          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  314  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  315  	struct fb_info *info = platform_get_drvdata(pdev);                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  316  									   \
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  317  	fbtft_remove_common(&pdev->dev, info);                             \
cb08d3d2a3e4d2 Uwe Kleine-König 2021-10-12  318  	return 0;                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  319  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  320  									   \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  321  FBTFT_DT_TABLE(_compatible)						   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  322  									   \
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  323  FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)			   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  324  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  325  static struct platform_driver fbtft_driver_platform_driver = {             \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  326  	.driver = {                                                        \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  327  		.name   = _name,                                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  328  		.owner  = THIS_MODULE,                                     \
189f39ee6ac51d Andy Shevchenko  2019-11-20  329  		.of_match_table = dt_ids,                                  \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  330  	},                                                                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  331  	.probe  = fbtft_driver_probe_pdev,                                 \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  332  	.remove = fbtft_driver_remove_pdev,                                \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  333  };                                                                         \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  334  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  335  static int __init fbtft_driver_module_init(void)                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  336  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  337  	int ret;                                                           \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  338  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  339  	ret = spi_register_driver(&fbtft_driver_spi_driver);               \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  340  	if (ret < 0)                                                       \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  341  		return ret;                                                \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  342  	ret = platform_driver_register(&fbtft_driver_platform_driver);     \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  343  	if (ret < 0)                                                       \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  344  		spi_unregister_driver(&fbtft_driver_spi_driver);           \
7d8e4c98d13b6b Uwe Kleine-König 2022-01-23  345  	return ret;                                                        \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  346  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  347  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  348  static void __exit fbtft_driver_module_exit(void)                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  349  {                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  350  	spi_unregister_driver(&fbtft_driver_spi_driver);                   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  351  	platform_driver_unregister(&fbtft_driver_platform_driver);         \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  352  }                                                                          \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  353  									   \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  354  module_init(fbtft_driver_module_init);                                     \
c296d5f9957c03 Thomas Petazzoni 2014-12-31  355  module_exit(fbtft_driver_module_exit);
15e66fc72925a4 Heiner Kallweit  2021-12-01  356  
15e66fc72925a4 Heiner Kallweit  2021-12-01  357  #define FBTFT_REGISTER_SPI_DRIVER(_name, _comp_vend, _comp_dev, _display)	\
15e66fc72925a4 Heiner Kallweit  2021-12-01  358  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  359  FBTFT_DT_TABLE(_comp_vend "," _comp_dev)					\
15e66fc72925a4 Heiner Kallweit  2021-12-01  360  										\
15e66fc72925a4 Heiner Kallweit  2021-12-01 @361  static const struct spi_device_id spi_ids[] = {					\
15e66fc72925a4 Heiner Kallweit  2021-12-01  362  	{ .name = _comp_dev },							\
15e66fc72925a4 Heiner Kallweit  2021-12-01  363  	{},									\
15e66fc72925a4 Heiner Kallweit  2021-12-01  364  };										\
15e66fc72925a4 Heiner Kallweit  2021-12-01 @365  MODULE_DEVICE_TABLE(spi, spi_ids);						\
15e66fc72925a4 Heiner Kallweit  2021-12-01  366  										\
c222ea5d2f3361 Uwe Kleine-König 2022-01-23  367  FBTFT_SPI_DRIVER(_name, _comp_vend "," _comp_dev, _display, spi_ids)		\
15e66fc72925a4 Heiner Kallweit  2021-12-01  368  										\
15e66fc72925a4 Heiner Kallweit  2021-12-01  369  module_spi_driver(fbtft_driver_spi_driver);
c296d5f9957c03 Thomas Petazzoni 2014-12-31  370  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-19 19:21 ` Ian Cowan
@ 2022-04-20  6:47   ` Uwe Kleine-König
  -1 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König @ 2022-04-20  6:47 UTC (permalink / raw)
  To: Ian Cowan; +Cc: gregkh, dri-devel, linux-fbdev, linux-staging

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> Removed an unnecessary semicolon at the end of a macro call
> 
> Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> ---
>  drivers/staging/fbtft/fbtft.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 2c2b5f1c1df3..aa66760e1a9c 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -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)

In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
single instance in the kernel without a semicolon[1]. That's in
drivers/pci/controller/pcie-microchip-host.c and this only works because
this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
evaluates to nothing. Will send a patch for that one.

Best regards
Uwe

[1] git grep -E '^[[:space:]]*MODULE_DEVICE_TABLE\([^;]*$'

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-20  6:47   ` Uwe Kleine-König
  0 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König @ 2022-04-20  6:47 UTC (permalink / raw)
  To: Ian Cowan; +Cc: gregkh, linux-fbdev, linux-staging, dri-devel

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> Removed an unnecessary semicolon at the end of a macro call
> 
> Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> ---
>  drivers/staging/fbtft/fbtft.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> index 2c2b5f1c1df3..aa66760e1a9c 100644
> --- a/drivers/staging/fbtft/fbtft.h
> +++ b/drivers/staging/fbtft/fbtft.h
> @@ -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)

In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
single instance in the kernel without a semicolon[1]. That's in
drivers/pci/controller/pcie-microchip-host.c and this only works because
this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
evaluates to nothing. Will send a patch for that one.

Best regards
Uwe

[1] git grep -E '^[[:space:]]*MODULE_DEVICE_TABLE\([^;]*$'

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-20  6:47   ` Uwe Kleine-König
@ 2022-04-20 13:57     ` Ian Cowan
  -1 siblings, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-20 13:57 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: gregkh, dri-devel, linux-fbdev, linux-staging

On Wed, Apr 20, 2022 at 08:47:11AM +0200, Uwe Kleine-König wrote:
> On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> > Removed an unnecessary semicolon at the end of a macro call
> > 
> > Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> > ---
> >  drivers/staging/fbtft/fbtft.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> > index 2c2b5f1c1df3..aa66760e1a9c 100644
> > --- a/drivers/staging/fbtft/fbtft.h
> > +++ b/drivers/staging/fbtft/fbtft.h
> > @@ -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)
> 
> In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
> single instance in the kernel without a semicolon[1]. That's in
> drivers/pci/controller/pcie-microchip-host.c and this only works because
> this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
> evaluates to nothing. Will send a patch for that one.
> 
> Best regards
> Uwe
> 
> [1] git grep -E '^[[:space:]]*MODULE_DEVICE_TABLE\([^;]*$'
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

When I built this, it appeared to succeed. I used the command "make
M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
is my first patch so it's highly likely I did this incorrectly.

---
Ian Cowan

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-20 13:57     ` Ian Cowan
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-20 13:57 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: gregkh, linux-fbdev, linux-staging, dri-devel

On Wed, Apr 20, 2022 at 08:47:11AM +0200, Uwe Kleine-König wrote:
> On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> > Removed an unnecessary semicolon at the end of a macro call
> > 
> > Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> > ---
> >  drivers/staging/fbtft/fbtft.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> > index 2c2b5f1c1df3..aa66760e1a9c 100644
> > --- a/drivers/staging/fbtft/fbtft.h
> > +++ b/drivers/staging/fbtft/fbtft.h
> > @@ -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)
> 
> In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
> single instance in the kernel without a semicolon[1]. That's in
> drivers/pci/controller/pcie-microchip-host.c and this only works because
> this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
> evaluates to nothing. Will send a patch for that one.
> 
> Best regards
> Uwe
> 
> [1] git grep -E '^[[:space:]]*MODULE_DEVICE_TABLE\([^;]*$'
> 
> -- 
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | https://www.pengutronix.de/ |

When I built this, it appeared to succeed. I used the command "make
M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
is my first patch so it's highly likely I did this incorrectly.

---
Ian Cowan

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-20 13:57     ` Ian Cowan
@ 2022-04-20 14:36       ` Uwe Kleine-König
  -1 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König @ 2022-04-20 14:36 UTC (permalink / raw)
  To: Ian Cowan; +Cc: gregkh, dri-devel, linux-fbdev, linux-staging

[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]

Hello Ian,

On Wed, Apr 20, 2022 at 09:57:27AM -0400, Ian Cowan wrote:
> On Wed, Apr 20, 2022 at 08:47:11AM +0200, Uwe Kleine-König wrote:
> > On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> > > Removed an unnecessary semicolon at the end of a macro call
> > > 
> > > Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> > > ---
> > >  drivers/staging/fbtft/fbtft.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> > > index 2c2b5f1c1df3..aa66760e1a9c 100644
> > > --- a/drivers/staging/fbtft/fbtft.h
> > > +++ b/drivers/staging/fbtft/fbtft.h
> > > @@ -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)
> > 
> > In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
> > single instance in the kernel without a semicolon[1]. That's in
> > drivers/pci/controller/pcie-microchip-host.c and this only works because
> > this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
> > evaluates to nothing. Will send a patch for that one.

FTR: Patch was sent: https://lore.kernel.org/linux-pci/20220420065832.14173-1-u.kleine-koenig@pengutronix.de

> When I built this, it appeared to succeed. I used the command "make
> M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
> is my first patch so it's highly likely I did this incorrectly.

I don't know for sure, but I'd have said that the M= stuff is for
out-of-tree modules only.

I'd recommend:

	make allmodconfig
	make drivers/staging/fbtft/

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-20 14:36       ` Uwe Kleine-König
  0 siblings, 0 replies; 14+ messages in thread
From: Uwe Kleine-König @ 2022-04-20 14:36 UTC (permalink / raw)
  To: Ian Cowan; +Cc: gregkh, linux-fbdev, linux-staging, dri-devel

[-- Attachment #1: Type: text/plain, Size: 1958 bytes --]

Hello Ian,

On Wed, Apr 20, 2022 at 09:57:27AM -0400, Ian Cowan wrote:
> On Wed, Apr 20, 2022 at 08:47:11AM +0200, Uwe Kleine-König wrote:
> > On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
> > > Removed an unnecessary semicolon at the end of a macro call
> > > 
> > > Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
> > > ---
> > >  drivers/staging/fbtft/fbtft.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
> > > index 2c2b5f1c1df3..aa66760e1a9c 100644
> > > --- a/drivers/staging/fbtft/fbtft.h
> > > +++ b/drivers/staging/fbtft/fbtft.h
> > > @@ -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)
> > 
> > In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
> > single instance in the kernel without a semicolon[1]. That's in
> > drivers/pci/controller/pcie-microchip-host.c and this only works because
> > this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
> > evaluates to nothing. Will send a patch for that one.

FTR: Patch was sent: https://lore.kernel.org/linux-pci/20220420065832.14173-1-u.kleine-koenig@pengutronix.de

> When I built this, it appeared to succeed. I used the command "make
> M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
> is my first patch so it's highly likely I did this incorrectly.

I don't know for sure, but I'd have said that the M= stuff is for
out-of-tree modules only.

I'd recommend:

	make allmodconfig
	make drivers/staging/fbtft/

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-20 14:36       ` Uwe Kleine-König
  (?)
@ 2022-04-20 15:47       ` Javier Martinez Canillas
  2022-04-20 17:19         ` Javier Martinez Canillas
  2022-04-20 17:20           ` Ian Cowan
  -1 siblings, 2 replies; 14+ messages in thread
From: Javier Martinez Canillas @ 2022-04-20 15:47 UTC (permalink / raw)
  To: Uwe Kleine-König, Ian Cowan
  Cc: gregkh, linux-fbdev, linux-staging, dri-devel

On 4/20/22 16:36, Uwe Kleine-König wrote:
> Hello Ian,
> 
> On Wed, Apr 20, 2022 at 09:57:27AM -0400, Ian Cowan wrote:
>> On Wed, Apr 20, 2022 at 08:47:11AM +0200, Uwe Kleine-König wrote:
>>> On Tue, Apr 19, 2022 at 03:21:28PM -0400, Ian Cowan wrote:
>>>> Removed an unnecessary semicolon at the end of a macro call
>>>>
>>>> Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
>>>> ---
>>>>  drivers/staging/fbtft/fbtft.h | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
>>>> index 2c2b5f1c1df3..aa66760e1a9c 100644
>>>> --- a/drivers/staging/fbtft/fbtft.h
>>>> +++ b/drivers/staging/fbtft/fbtft.h
>>>> @@ -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)
>>>
>>> In fact the ; after MODULE_DEVICE_TABLE is necessary. There is only a
>>> single instance in the kernel without a semicolon[1]. That's in
>>> drivers/pci/controller/pcie-microchip-host.c and this only works because
>>> this driver cannot be compiled as a module and so MODULE_DEVICE_TABLE
>>> evaluates to nothing. Will send a patch for that one.
>

Indeed. I was curious about this so I went to look at the driver code.

For this particular driver it may be not necessary, but that's just due
how these fbtft drivers define their MODULE_DEVICE_TABLE(), using a lot
of macro layers.

As an example, drivers/staging/fbtft/fb_agm1264k-fl.c does the following:

FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display);

which is defined as:

#define FBTFT_REGISTER_DRIVER(_name, _compatible, _display)                \
...									   \
FBTFT_DT_TABLE(_compatible)						   \
...

which in turn is defined as:

#define FBTFT_DT_TABLE(_compatible)						\
static const struct of_device_id dt_ids[] = {					\
	{ .compatible = _compatible },						\
	{},									\
};										\
MODULE_DEVICE_TABLE(of, dt_ids);

so it seems that it builds, just because the semicolon for the expression
is the one that's after the FBTFT_REGISTER_DRIVER(); in the driver.

> FTR: Patch was sent: https://lore.kernel.org/linux-pci/20220420065832.14173-1-u.kleine-koenig@pengutronix.de
> 
>> When I built this, it appeared to succeed. I used the command "make
>> M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
>> is my first patch so it's highly likely I did this incorrectly.
>

You are just changing a header file though, did you also enable one of the
fbtft drivers as a module to see if those build? But as said, by looking at
the code it seems that should build correctly.

I agree with Uwe though that is less confusing to have a semicolon after
the MODULE_DEVICE_TABLE(), but I'm not the driver maintainer to decide.
 
> I don't know for sure, but I'd have said that the M= stuff is for
> out-of-tree modules only.
>

It does work, I use M= to build drivers in mainline that are configured
to build as a module all the time.

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat


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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-20 15:47       ` Javier Martinez Canillas
@ 2022-04-20 17:19         ` Javier Martinez Canillas
  2022-04-20 17:20           ` Ian Cowan
  1 sibling, 0 replies; 14+ messages in thread
From: Javier Martinez Canillas @ 2022-04-20 17:19 UTC (permalink / raw)
  To: Uwe Kleine-König, Ian Cowan
  Cc: gregkh, linux-fbdev, linux-staging, dri-devel

On 4/20/22 17:47, Javier Martinez Canillas wrote:

[snip]

>>
>>> When I built this, it appeared to succeed. I used the command "make
>>> M=/drivers/staging/fbtft modules". Is this incorrect? For reference this
>>> is my first patch so it's highly likely I did this incorrectly.
>>
> 
> You are just changing a header file though, did you also enable one of the
> fbtft drivers as a module to see if those build? But as said, by looking at
> the code it seems that should build correctly.
> 

It seems that this is the problem with Ian's build test. If I enabled both
CONFIG_FB_TFT=y and CONFIG_FB_TFT_AGM1264K_FL=m, I get the following build
error (as Uwe pointed out before):

$ make M=drivers/staging/fbtft/
  CC [M]  drivers/staging/fbtft/fb_agm1264k-fl.o
In file included from drivers/staging/fbtft/fb_agm1264k-fl.c:15:
drivers/staging/fbtft/fbtft.h:284:1: error: expected ‘,’ or ‘;’ before ‘static’
  284 | static int fbtft_driver_probe_spi(struct spi_device *spi)                       \
      | ^~~~~~
drivers/staging/fbtft/fbtft.h:323:1: note: in expansion of macro ‘FBTFT_SPI_DRIVER’
  323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
      | ^~~~~~~~~~~~~~~~
drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &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:323:1: note: in expansion of macro ‘FBTFT_SPI_DRIVER’
  323 | FBTFT_SPI_DRIVER(_name, _compatible, _display, NULL)                       \
      | ^~~~~~~~~~~~~~~~
drivers/staging/fbtft/fb_agm1264k-fl.c:435:1: note: in expansion of macro ‘FBTFT_REGISTER_DRIVER’
  435 | FBTFT_REGISTER_DRIVER(DRVNAME, "displaytronic,fb_agm1264k-fl", &display);
      | ^~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:288: drivers/staging/fbtft/fb_agm1264k-fl.o] Error 1
make: *** [Makefile:1834: drivers/staging/fbtft] Error 2

while without removing the semicolon like this patch does, it builds correctly:

$ make M=drivers/staging/fbtft/
  CC [M]  drivers/staging/fbtft/fb_agm1264k-fl.o
  MODPOST drivers/staging/fbtft/Module.symvers
  LD [M]  drivers/staging/fbtft/fb_agm1264k-fl.ko

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat


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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
  2022-04-20 15:47       ` Javier Martinez Canillas
@ 2022-04-20 17:20           ` Ian Cowan
  2022-04-20 17:20           ` Ian Cowan
  1 sibling, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-20 17:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: Uwe Kleine-König, gregkh, linux-fbdev, linux-staging, dri-devel

On Wed, Apr 20, 2022 at 05:47:49PM +0200, Javier Martinez Canillas wrote:
> On 4/20/22 16:36, Uwe Kleine-König wrote:
> You are just changing a header file though, did you also enable one of the
> fbtft drivers as a module to see if those build? But as said, by looking at
> the code it seems that should build correctly.

Not loading the driver was the issue. Thanks for helping me get it fixed!

---
Ian Cowan

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

* Re: [PATCH] Staging: fbtft: Fix style problem in header
@ 2022-04-20 17:20           ` Ian Cowan
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Cowan @ 2022-04-20 17:20 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: gregkh, linux-fbdev, linux-staging, dri-devel, Uwe Kleine-König

On Wed, Apr 20, 2022 at 05:47:49PM +0200, Javier Martinez Canillas wrote:
> On 4/20/22 16:36, Uwe Kleine-König wrote:
> You are just changing a header file though, did you also enable one of the
> fbtft drivers as a module to see if those build? But as said, by looking at
> the code it seems that should build correctly.

Not loading the driver was the issue. Thanks for helping me get it fixed!

---
Ian Cowan

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

end of thread, other threads:[~2022-04-21 11:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 19:21 [PATCH] Staging: fbtft: Fix style problem in header Ian Cowan
2022-04-19 19:21 ` Ian Cowan
2022-04-20  1:32 ` kernel test robot
2022-04-20  1:32   ` kernel test robot
2022-04-20  6:47 ` Uwe Kleine-König
2022-04-20  6:47   ` Uwe Kleine-König
2022-04-20 13:57   ` Ian Cowan
2022-04-20 13:57     ` Ian Cowan
2022-04-20 14:36     ` Uwe Kleine-König
2022-04-20 14:36       ` Uwe Kleine-König
2022-04-20 15:47       ` Javier Martinez Canillas
2022-04-20 17:19         ` Javier Martinez Canillas
2022-04-20 17:20         ` Ian Cowan
2022-04-20 17:20           ` Ian Cowan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.