linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: linux-next: Tree for Jul 20 (gpio/gpio-ge)
       [not found] <20230720142243.1b463b82@canb.auug.org.au>
@ 2023-07-20 19:54 ` Randy Dunlap
  2023-07-20 19:56   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2023-07-20 19:54 UTC (permalink / raw)
  To: Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, linux-gpio, Martyn Welch,
	Linus Walleij, Bartosz Golaszewski, Andy Shevchenko



On 7/19/23 21:22, Stephen Rothwell wrote:
> Hi all,
> 
> Changes since 20230719:
> 

on ppc32:
when CONFIG_MODULES is not set:

../drivers/gpio/gpio-ge.c:53:41: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
   53 | static int __init gef_gpio_probe(struct platform_device *pdev)
      |                                         ^~~~~~~~~~~~~~~
../drivers/gpio/gpio-ge.c: In function 'gef_gpio_probe':
../drivers/gpio/gpio-ge.c:59:32: error: invalid use of undefined type 'struct platform_device'
   59 |         gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL);
      |                                ^~
../drivers/gpio/gpio-ge.c:63:29: error: invalid use of undefined type 'struct platform_device'
   63 |         regs = of_iomap(pdev->dev.of_node, 0);
      |                             ^~
../drivers/gpio/gpio-ge.c:67:35: error: invalid use of undefined type 'struct platform_device'
   67 |         ret = bgpio_init(gc, &pdev->dev, 4, regs + GEF_GPIO_IN,
      |                                   ^~
In file included from ../include/linux/device.h:15,
                 from ../arch/powerpc/include/asm/io.h:22,
                 from ../include/linux/io.h:13,
                 from ../drivers/gpio/gpio-ge.c:21:
../drivers/gpio/gpio-ge.c:71:30: error: invalid use of undefined type 'struct platform_device'
   71 |                 dev_err(&pdev->dev, "bgpio_init failed\n");
      |                              ^~
../include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
  110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
      |                         ^~~
../drivers/gpio/gpio-ge.c:71:17: note: in expansion of macro 'dev_err'
   71 |                 dev_err(&pdev->dev, "bgpio_init failed\n");
      |                 ^~~~~~~
../drivers/gpio/gpio-ge.c:76:41: error: invalid use of undefined type 'struct platform_device'
   76 |         gc->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOF", pdev->dev.of_node);
      |                                         ^~
../drivers/gpio/gpio-ge.c:76:72: error: invalid use of undefined type 'struct platform_device'
   76 |         gc->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOF", pdev->dev.of_node);
      |                                                                        ^~
../drivers/gpio/gpio-ge.c:83:67: error: invalid use of undefined type 'struct platform_device'
   83 |         gc->ngpio = (u16)(uintptr_t)of_device_get_match_data(&pdev->dev);
      |                                                                   ^~
In file included from ../drivers/gpio/gpio-ge.c:26:
../drivers/gpio/gpio-ge.c:86:43: error: invalid use of undefined type 'struct platform_device'
   86 |         ret = devm_gpiochip_add_data(&pdev->dev, gc, NULL);
      |                                           ^~
../include/linux/gpio/driver.h:589:49: note: in definition of macro 'devm_gpiochip_add_data'
  589 |                 devm_gpiochip_add_data_with_key(dev, gc, data, &lock_key, \
      |                                                 ^~~
In file included from ../include/linux/kernel.h:30,
                 from ../drivers/gpio/gpio-ge.c:20:
../drivers/gpio/gpio-ge.c:93:61: error: invalid use of undefined type 'struct platform_device'
   93 |         pr_err("%pOF: GPIO chip registration failed\n", pdev->dev.of_node);
      |                                                             ^~
../include/linux/printk.h:427:33: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                                 ^~~~~~~~~~~
../include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
../drivers/gpio/gpio-ge.c:93:9: note: in expansion of macro 'pr_err'
   93 |         pr_err("%pOF: GPIO chip registration failed\n", pdev->dev.of_node);
      |         ^~~~~~
../drivers/gpio/gpio-ge.c: At top level:
../drivers/gpio/gpio-ge.c:97:15: error: variable 'gef_gpio_driver' has initializer but incomplete type
   97 | static struct platform_driver gef_gpio_driver = {
      |               ^~~~~~~~~~~~~~~
../drivers/gpio/gpio-ge.c:98:10: error: 'struct platform_driver' has no member named 'driver'
   98 |         .driver = {
      |          ^~~~~~
../drivers/gpio/gpio-ge.c:98:19: error: extra brace group at end of initializer
   98 |         .driver = {
      |                   ^
../drivers/gpio/gpio-ge.c:98:19: note: (near initialization for 'gef_gpio_driver')
../drivers/gpio/gpio-ge.c:98:19: warning: excess elements in struct initializer
../drivers/gpio/gpio-ge.c:98:19: note: (near initialization for 'gef_gpio_driver')
../drivers/gpio/gpio-ge.c:103:1: warning: data definition has no type or storage class
  103 | module_platform_driver_probe(gef_gpio_driver, gef_gpio_probe);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/gpio/gpio-ge.c:103:1: error: type defaults to 'int' in declaration of 'module_platform_driver_probe' [-Werror=implicit-int]
../drivers/gpio/gpio-ge.c:103:1: warning: parameter names (without types) in function declaration
../drivers/gpio/gpio-ge.c:97:31: error: storage size of 'gef_gpio_driver' isn't known
   97 | static struct platform_driver gef_gpio_driver = {
      |                               ^~~~~~~~~~~~~~~
../drivers/gpio/gpio-ge.c:97:31: warning: 'gef_gpio_driver' defined but not used [-Wunused-variable]
../drivers/gpio/gpio-ge.c:53:19: warning: 'gef_gpio_probe' defined but not used [-Wunused-function]
   53 | static int __init gef_gpio_probe(struct platform_device *pdev)
      |                   ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors


@Martyn:
Please add a trailing '>' here:
MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");


-- 
~Randy

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

* Re: linux-next: Tree for Jul 20 (gpio/gpio-ge)
  2023-07-20 19:54 ` linux-next: Tree for Jul 20 (gpio/gpio-ge) Randy Dunlap
@ 2023-07-20 19:56   ` Randy Dunlap
  2023-07-24 15:23     ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2023-07-20 19:56 UTC (permalink / raw)
  To: Stephen Rothwell, Linux Next Mailing List
  Cc: Linux Kernel Mailing List, linux-gpio, Linus Walleij,
	Bartosz Golaszewski, Andy Shevchenko



On 7/20/23 12:54, Randy Dunlap wrote:
> 
> 
> On 7/19/23 21:22, Stephen Rothwell wrote:
>> Hi all,
>>
>> Changes since 20230719:
>>
> 
> on ppc32:
> when CONFIG_MODULES is not set:
> 
> ../drivers/gpio/gpio-ge.c:53:41: warning: 'struct platform_device' declared inside parameter list will not be visible outside of this definition or declaration
>    53 | static int __init gef_gpio_probe(struct platform_device *pdev)
>       |                                         ^~~~~~~~~~~~~~~
> ../drivers/gpio/gpio-ge.c: In function 'gef_gpio_probe':
> ../drivers/gpio/gpio-ge.c:59:32: error: invalid use of undefined type 'struct platform_device'
>    59 |         gc = devm_kzalloc(&pdev->dev, sizeof(*gc), GFP_KERNEL);
>       |                                ^~
> ../drivers/gpio/gpio-ge.c:63:29: error: invalid use of undefined type 'struct platform_device'
>    63 |         regs = of_iomap(pdev->dev.of_node, 0);
>       |                             ^~
> ../drivers/gpio/gpio-ge.c:67:35: error: invalid use of undefined type 'struct platform_device'
>    67 |         ret = bgpio_init(gc, &pdev->dev, 4, regs + GEF_GPIO_IN,
>       |                                   ^~
> In file included from ../include/linux/device.h:15,
>                  from ../arch/powerpc/include/asm/io.h:22,
>                  from ../include/linux/io.h:13,
>                  from ../drivers/gpio/gpio-ge.c:21:
> ../drivers/gpio/gpio-ge.c:71:30: error: invalid use of undefined type 'struct platform_device'
>    71 |                 dev_err(&pdev->dev, "bgpio_init failed\n");
>       |                              ^~
> ../include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
>   110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
>       |                         ^~~
> ../drivers/gpio/gpio-ge.c:71:17: note: in expansion of macro 'dev_err'
>    71 |                 dev_err(&pdev->dev, "bgpio_init failed\n");
>       |                 ^~~~~~~
> ../drivers/gpio/gpio-ge.c:76:41: error: invalid use of undefined type 'struct platform_device'
>    76 |         gc->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOF", pdev->dev.of_node);
>       |                                         ^~
> ../drivers/gpio/gpio-ge.c:76:72: error: invalid use of undefined type 'struct platform_device'
>    76 |         gc->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOF", pdev->dev.of_node);
>       |                                                                        ^~
> ../drivers/gpio/gpio-ge.c:83:67: error: invalid use of undefined type 'struct platform_device'
>    83 |         gc->ngpio = (u16)(uintptr_t)of_device_get_match_data(&pdev->dev);
>       |                                                                   ^~
> In file included from ../drivers/gpio/gpio-ge.c:26:
> ../drivers/gpio/gpio-ge.c:86:43: error: invalid use of undefined type 'struct platform_device'
>    86 |         ret = devm_gpiochip_add_data(&pdev->dev, gc, NULL);
>       |                                           ^~
> ../include/linux/gpio/driver.h:589:49: note: in definition of macro 'devm_gpiochip_add_data'
>   589 |                 devm_gpiochip_add_data_with_key(dev, gc, data, &lock_key, \
>       |                                                 ^~~
> In file included from ../include/linux/kernel.h:30,
>                  from ../drivers/gpio/gpio-ge.c:20:
> ../drivers/gpio/gpio-ge.c:93:61: error: invalid use of undefined type 'struct platform_device'
>    93 |         pr_err("%pOF: GPIO chip registration failed\n", pdev->dev.of_node);
>       |                                                             ^~
> ../include/linux/printk.h:427:33: note: in definition of macro 'printk_index_wrap'
>   427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
>       |                                 ^~~~~~~~~~~
> ../include/linux/printk.h:498:9: note: in expansion of macro 'printk'
>   498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
>       |         ^~~~~~
> ../drivers/gpio/gpio-ge.c:93:9: note: in expansion of macro 'pr_err'
>    93 |         pr_err("%pOF: GPIO chip registration failed\n", pdev->dev.of_node);
>       |         ^~~~~~
> ../drivers/gpio/gpio-ge.c: At top level:
> ../drivers/gpio/gpio-ge.c:97:15: error: variable 'gef_gpio_driver' has initializer but incomplete type
>    97 | static struct platform_driver gef_gpio_driver = {
>       |               ^~~~~~~~~~~~~~~
> ../drivers/gpio/gpio-ge.c:98:10: error: 'struct platform_driver' has no member named 'driver'
>    98 |         .driver = {
>       |          ^~~~~~
> ../drivers/gpio/gpio-ge.c:98:19: error: extra brace group at end of initializer
>    98 |         .driver = {
>       |                   ^
> ../drivers/gpio/gpio-ge.c:98:19: note: (near initialization for 'gef_gpio_driver')
> ../drivers/gpio/gpio-ge.c:98:19: warning: excess elements in struct initializer
> ../drivers/gpio/gpio-ge.c:98:19: note: (near initialization for 'gef_gpio_driver')
> ../drivers/gpio/gpio-ge.c:103:1: warning: data definition has no type or storage class
>   103 | module_platform_driver_probe(gef_gpio_driver, gef_gpio_probe);
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../drivers/gpio/gpio-ge.c:103:1: error: type defaults to 'int' in declaration of 'module_platform_driver_probe' [-Werror=implicit-int]
> ../drivers/gpio/gpio-ge.c:103:1: warning: parameter names (without types) in function declaration
> ../drivers/gpio/gpio-ge.c:97:31: error: storage size of 'gef_gpio_driver' isn't known
>    97 | static struct platform_driver gef_gpio_driver = {
>       |                               ^~~~~~~~~~~~~~~
> ../drivers/gpio/gpio-ge.c:97:31: warning: 'gef_gpio_driver' defined but not used [-Wunused-variable]
> ../drivers/gpio/gpio-ge.c:53:19: warning: 'gef_gpio_probe' defined but not used [-Wunused-function]
>    53 | static int __init gef_gpio_probe(struct platform_device *pdev)
>       |                   ^~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> 
> 
> @Martyn:
> Please add a trailing '>' here:
> MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");

and email to Martyn bounced... :(

-- 
~Randy

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

* Re: linux-next: Tree for Jul 20 (gpio/gpio-ge)
  2023-07-20 19:56   ` Randy Dunlap
@ 2023-07-24 15:23     ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-07-24 15:23 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, linux-gpio, Linus Walleij,
	Bartosz Golaszewski

On Thu, Jul 20, 2023 at 12:56:53PM -0700, Randy Dunlap wrote:
> On 7/20/23 12:54, Randy Dunlap wrote:
> > On 7/19/23 21:22, Stephen Rothwell wrote:

> >> Changes since 20230719:

> > @Martyn:
> > Please add a trailing '>' here:
> > MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");
> 
> and email to Martyn bounced... :(

Thank you for the report, I'm going to fix it right away.
It also seems to have COMPILE_TEST to be added.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2023-07-24 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230720142243.1b463b82@canb.auug.org.au>
2023-07-20 19:54 ` linux-next: Tree for Jul 20 (gpio/gpio-ge) Randy Dunlap
2023-07-20 19:56   ` Randy Dunlap
2023-07-24 15:23     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).