# \[dtor-input:gpio-of-cleanups 5/17\] arch/mips/lantiq/xway/vmmc.c:68:38: error: unterminated argument list invoking macro "dev\_err"

- From: kernel test robot \<hidden\>
- Date: 2022-09-27 02:34:30 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2022/09/8934590
- Thread: https://ratatoskr.run/linux-input/2022/09/8934590/t.md

```text
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git gpio-of-cleanups
head:   5c6098794cca5ac0a774ee430b72e18b8b98c032
commit: 4ff604dfddb832ecf5b235906bddd04cfba14b9c [5/17] MIPS: Lantiq: switch vmmc to use gpiod API
config: mips-xway_defconfig
compiler: mips-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?id=4ff604dfddb832ecf5b235906bddd04cfba14b9c
        git remote add dtor-input https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
        git fetch --no-tags dtor-input gpio-of-cleanups
        git checkout 4ff604dfddb832ecf5b235906bddd04cfba14b9c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot [ref]

All errors (new ones prefixed by >>):

   arch/mips/lantiq/xway/vmmc.c:17:15: warning: no previous prototype for 'ltq_get_cp1_base' [-Wmissing-prototypes]
      17 | unsigned int *ltq_get_cp1_base(void)
         |               ^~~~~~~~~~~~~~~~
   arch/mips/lantiq/xway/vmmc.c: In function 'vmmc_probe':
>> arch/mips/lantiq/xway/vmmc.c:68:38: error: unterminated argument list invoking macro "dev_err"
      68 | builtin_platform_driver(vmmc_driver);
         |                                      ^
>> arch/mips/lantiq/xway/vmmc.c:42:25: error: 'dev_err' undeclared (first use in this function); did you mean '_dev_err'?
      42 |                         dev_err(&pdev->dev,
         |                         ^~~~~~~
         |                         _dev_err
   arch/mips/lantiq/xway/vmmc.c:42:25: note: each undeclared identifier is reported only once for each function it appears in
>> arch/mips/lantiq/xway/vmmc.c:42:32: error: expected ';' at end of input
      42 |                         dev_err(&pdev->dev,
         |                                ^
         |                                ;
   ......
>> arch/mips/lantiq/xway/vmmc.c:42:25: error: expected declaration or statement at end of input
      42 |                         dev_err(&pdev->dev,
         |                         ^~~~~~~
>> arch/mips/lantiq/xway/vmmc.c:42:25: error: expected declaration or statement at end of input
>> arch/mips/lantiq/xway/vmmc.c:42:25: error: expected declaration or statement at end of input
   arch/mips/lantiq/xway/vmmc.c:42:25: error: no return statement in function returning non-void [-Werror=return-type]
   arch/mips/lantiq/xway/vmmc.c: At top level:
   arch/mips/lantiq/xway/vmmc.c:26:12: warning: 'vmmc_probe' defined but not used [-Wunused-function]
      26 | static int vmmc_probe(struct platform_device *pdev)
         |            ^~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/dev_err +68 arch/mips/lantiq/xway/vmmc.c

05637f10e719c1 John Crispin      2013-03-13  25  
05637f10e719c1 John Crispin      2013-03-13  26  static int vmmc_probe(struct platform_device *pdev)
05637f10e719c1 John Crispin      2013-03-13  27  {
05637f10e719c1 John Crispin      2013-03-13  28  #define CP1_SIZE       (1 << 20)
4ff604dfddb832 Dmitry Torokhov   2022-09-16  29  	struct gpio_desc *gpio;
05637f10e719c1 John Crispin      2013-03-13  30  	int gpio_count;
05637f10e719c1 John Crispin      2013-03-13  31  	dma_addr_t dma;
05637f10e719c1 John Crispin      2013-03-13  32  
05637f10e719c1 John Crispin      2013-03-13  33  	cp1_base =
74f03104ed465f Christoph Hellwig 2019-02-01  34  		(void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
74f03104ed465f Christoph Hellwig 2019-02-01  35  						    &dma, GFP_KERNEL));
05637f10e719c1 John Crispin      2013-03-13  36  
4ff604dfddb832 Dmitry Torokhov   2022-09-16  37  	gpio_count = gpiod_count(&pdev->dev, NULL);
05637f10e719c1 John Crispin      2013-03-13  38  	while (gpio_count > 0) {
4ff604dfddb832 Dmitry Torokhov   2022-09-16  39  		gpio = devm_gpiod_get_index(&pdev->dev,
4ff604dfddb832 Dmitry Torokhov   2022-09-16  40  					    NULL, --gpio_count, GPIOD_OUT_HIGH);
4ff604dfddb832 Dmitry Torokhov   2022-09-16  41  		if (IS_ERR(gpio)) {
4ff604dfddb832 Dmitry Torokhov   2022-09-16 @42  			dev_err(&pdev->dev,
4ff604dfddb832 Dmitry Torokhov   2022-09-16  43  				"failed to request GPIO idx %d: %d\n",
4ff604dfddb832 Dmitry Torokhov   2022-09-16  44  				gpio_count, PTR_ERR(gpio);
05637f10e719c1 John Crispin      2013-03-13  45  			continue;
4ff604dfddb832 Dmitry Torokhov   2022-09-16  46  		}
4ff604dfddb832 Dmitry Torokhov   2022-09-16  47  
4ff604dfddb832 Dmitry Torokhov   2022-09-16  48  		gpio_consumer_set_name(gpio, "vmmc-relay");
05637f10e719c1 John Crispin      2013-03-13  49  	}
05637f10e719c1 John Crispin      2013-03-13  50  
05637f10e719c1 John Crispin      2013-03-13  51  	dev_info(&pdev->dev, "reserved %dMB at 0x%p", CP1_SIZE >> 20, cp1_base);
05637f10e719c1 John Crispin      2013-03-13  52  
05637f10e719c1 John Crispin      2013-03-13  53  	return 0;
05637f10e719c1 John Crispin      2013-03-13  54  }
05637f10e719c1 John Crispin      2013-03-13  55  
05637f10e719c1 John Crispin      2013-03-13  56  static const struct of_device_id vmmc_match[] = {
05637f10e719c1 John Crispin      2013-03-13  57  	{ .compatible = "lantiq,vmmc-xway" },
05637f10e719c1 John Crispin      2013-03-13  58  	{},
05637f10e719c1 John Crispin      2013-03-13  59  };
05637f10e719c1 John Crispin      2013-03-13  60  
05637f10e719c1 John Crispin      2013-03-13  61  static struct platform_driver vmmc_driver = {
05637f10e719c1 John Crispin      2013-03-13  62  	.probe = vmmc_probe,
05637f10e719c1 John Crispin      2013-03-13  63  	.driver = {
05637f10e719c1 John Crispin      2013-03-13  64  		.name = "lantiq,vmmc",
05637f10e719c1 John Crispin      2013-03-13  65  		.of_match_table = vmmc_match,
05637f10e719c1 John Crispin      2013-03-13  66  	},
05637f10e719c1 John Crispin      2013-03-13  67  };
0008ef9b159598 Paul Gortmaker    2016-08-15 @68  builtin_platform_driver(vmmc_driver);

:::::: The code at line 68 was first introduced by commit
:::::: 0008ef9b159598fb209c134e111381f4fa263dc4 MIPS: Lantiq: Make vmmc explicitly non-modular

:::::: TO: Paul Gortmaker [ref]
:::::: CC: Ralf Baechle [ref]

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

## Attachments

- [config](https://ratatoskr.run/linux-input/2022/09/8934590/attachment/0) (text/plain, 83200 bytes)
