All of lore.kernel.org
 help / color / mirror / Atom feed
* next: arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
@ 2023-03-07 17:10 Naresh Kamboju
  2023-03-07 18:46 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2023-03-07 17:10 UTC (permalink / raw)
  To: Linux-Next Mailing List, open list, linux-mips, lkft-triage
  Cc: Thomas Bogendoerfer, Arnd Bergmann, Anders Roxell, Jiaxun Yang,
	Phil Mathieu-Daudé

Following build regression found while building mips ar7_defconfig
on Linux next-20230307 tag.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Please find the build log and details below.

build log:
--------
arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
   19 |         struct gpio_chip        chip;
      |                                 ^~~~
arch/mips/ar7/gpio.c: In function 'ar7_gpio_get_value':
arch/mips/ar7/gpio.c:24:38: error: implicit declaration of function
'gpiochip_get_data' [-Werror=implicit-function-declaration]
   24 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c:24:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
arch/mips/ar7/gpio.c: In function 'titan_gpio_get_value':
arch/mips/ar7/gpio.c:32:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   32 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'ar7_gpio_set_value':
arch/mips/ar7/gpio.c:42:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   42 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'titan_gpio_set_value':
arch/mips/ar7/gpio.c:55:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   55 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'ar7_gpio_direction_input':
arch/mips/ar7/gpio.c:68:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   68 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'titan_gpio_direction_input':
arch/mips/ar7/gpio.c:78:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   78 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'ar7_gpio_direction_output':
arch/mips/ar7/gpio.c:93:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
   93 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'titan_gpio_direction_output':
arch/mips/ar7/gpio.c:105:38: error: initialization of 'struct
ar7_gpio_chip *' from 'int' makes pointer from integer without a cast
[-Werror=int-conversion]
  105 |         struct ar7_gpio_chip *gpch = gpiochip_get_data(chip);
      |                                      ^~~~~~~~~~~~~~~~~
arch/mips/ar7/gpio.c: In function 'ar7_gpio_init':
arch/mips/ar7/gpio.c:318:15: error: implicit declaration of function
'gpiochip_add_data' [-Werror=implicit-function-declaration]
  318 |         ret = gpiochip_add_data(&gpch->chip, gpch);
      |               ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Build details,
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/testrun/15301952/suite/build/test/gcc-12-ar7_defconfig/log
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/testrun/15301952/suite/build/test/gcc-12-ar7_defconfig/history/


metadata:
  build_name: gcc-12-ar7_defconfig
  config: https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXLAJXuaMcoIJz6Tg4y1ecnvF/config
  download_url:
https://storage.tuxsuite.com/public/linaro/lkft/builds/2MfXLAJXuaMcoIJz6Tg4y1ecnvF/
  git_describe: next-20230307
  git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
  git_sha: 709c6adf19dc558e44ab5c01659b09a16a2d3c82
  git_short_log: 709c6adf19dc ("Add linux-next specific files for 20230307")


Steps to reproduce:
---------------
# To install tuxmake on your system globally:
# sudo pip3 install -U tuxmake
#
# See https://docs.tuxmake.org/ for complete documentation.
# Original tuxmake command with fragments listed below.

tuxmake --runtime podman --target-arch mips --toolchain gcc-12
--kconfig ar7_defconfig


--
Linaro LKFT
https://lkft.linaro.org

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

* Re: next: arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
  2023-03-07 17:10 next: arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type Naresh Kamboju
@ 2023-03-07 18:46 ` Arnd Bergmann
  2023-03-08 13:00   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-03-07 18:46 UTC (permalink / raw)
  To: Naresh Kamboju, linux-next, open list, linux-mips, lkft-triage,
	Linus Walleij, Andy Shevchenko
  Cc: Thomas Bogendoerfer, Anders Roxell, Jiaxun Yang, Phil Mathieu-Daudé

On Tue, Mar 7, 2023, at 18:10, Naresh Kamboju wrote:
> Following build regression found while building mips ar7_defconfig
> on Linux next-20230307 tag.
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> Please find the build log and details below.
>
> build log:
> --------
> arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
>    19 |         struct gpio_chip        chip;

It sounds like a result of 21d9526d13b5 ("gpiolib: Make the
legacy <linux/gpio.h> consumer-only"). I haven't tried it,
but I think this should fix it, unless there is another bug:

--- a/arch/mips/ar7/gpio.c
+++ b/arch/mips/ar7/gpio.c
@@ -7,7 +7,7 @@
 
 #include <linux/init.h>
 #include <linux/export.h>
-#include <linux/gpio.h>
+#include <linux/gpio/driver.h>
 
 #include <asm/mach-ar7/ar7.h>
 


      Arnd

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

* Re: next: arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
  2023-03-07 18:46 ` Arnd Bergmann
@ 2023-03-08 13:00   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-03-08 13:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Naresh Kamboju, linux-next, open list, linux-mips, lkft-triage,
	Linus Walleij, Thomas Bogendoerfer, Anders Roxell, Jiaxun Yang,
	Phil Mathieu-Daudé

On Tue, Mar 07, 2023 at 07:46:26PM +0100, Arnd Bergmann wrote:
> On Tue, Mar 7, 2023, at 18:10, Naresh Kamboju wrote:
> > Following build regression found while building mips ar7_defconfig
> > on Linux next-20230307 tag.
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > Please find the build log and details below.
> >
> > build log:
> > --------
> > arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type
> >    19 |         struct gpio_chip        chip;
> 
> It sounds like a result of 21d9526d13b5 ("gpiolib: Make the
> legacy <linux/gpio.h> consumer-only"). I haven't tried it,
> but I think this should fix it, unless there is another bug:
> 
> --- a/arch/mips/ar7/gpio.c
> +++ b/arch/mips/ar7/gpio.c
> @@ -7,7 +7,7 @@
>  
>  #include <linux/init.h>
>  #include <linux/export.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/driver.h>
>  
>  #include <asm/mach-ar7/ar7.h>

Thank you!
Can you send this as a formal patch?

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2023-03-08 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 17:10 next: arch/mips/ar7/gpio.c:19:33: error: field 'chip' has incomplete type Naresh Kamboju
2023-03-07 18:46 ` Arnd Bergmann
2023-03-08 13:00   ` Andy Shevchenko

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.