LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] selftests/gpio: Fix gpio compiling error
@ 2021-09-02  8:46 Li Zhijian
  2021-09-02  9:39 ` Philip Li
  2021-09-02 21:08 ` Shuah Khan
  0 siblings, 2 replies; 4+ messages in thread
From: Li Zhijian @ 2021-09-02  8:46 UTC (permalink / raw)
  To: bamv2005, shuah, linux-gpio, linux-kselftest
  Cc: linux-kernel, Li Zhijian, Philip Li, kernel test robot

[root@iaas-rpma gpio]# make
gcc     gpio-mockup-cdev.c  -o /home/lizhijian/linux/tools/testing/selftests/gpio/gpio-mockup-cdev
gpio-mockup-cdev.c: In function ‘request_line_v2’:
gpio-mockup-cdev.c:24:30: error: storage size of ‘req’ isn’t known
   24 |  struct gpio_v2_line_request req;
      |                              ^~~
gpio-mockup-cdev.c:32:14: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
   32 |  if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~

Search headers from linux tree like others, such as sched

CC: Philip Li <philip.li@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 tools/testing/selftests/gpio/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 39f2bbe8dd3d..42ea7d2aa844 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -3,5 +3,6 @@
 TEST_PROGS := gpio-mockup.sh
 TEST_FILES := gpio-mockup-sysfs.sh
 TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
+CFLAGS += -I../../../../usr/include
 
 include ../lib.mk
-- 
2.31.1




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

* Re: [PATCH] selftests/gpio: Fix gpio compiling error
  2021-09-02  8:46 [PATCH] selftests/gpio: Fix gpio compiling error Li Zhijian
@ 2021-09-02  9:39 ` Philip Li
  2021-09-02  9:40   ` Philip Li
  2021-09-02 21:08 ` Shuah Khan
  1 sibling, 1 reply; 4+ messages in thread
From: Philip Li @ 2021-09-02  9:39 UTC (permalink / raw)
  To: Li Zhijian
  Cc: bamv2005, shuah, linux-gpio, linux-kselftest, linux-kernel,
	kernel test robot

applied
On Thu, Sep 02, 2021 at 04:46:35PM +0800, Li Zhijian wrote:
> [root@iaas-rpma gpio]# make
> gcc     gpio-mockup-cdev.c  -o /home/lizhijian/linux/tools/testing/selftests/gpio/gpio-mockup-cdev
> gpio-mockup-cdev.c: In function ‘request_line_v2’:
> gpio-mockup-cdev.c:24:30: error: storage size of ‘req’ isn’t known
>    24 |  struct gpio_v2_line_request req;
>       |                              ^~~
> gpio-mockup-cdev.c:32:14: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
>    32 |  if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
>       |              ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Search headers from linux tree like others, such as sched
> 
> CC: Philip Li <philip.li@intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
>  tools/testing/selftests/gpio/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
> index 39f2bbe8dd3d..42ea7d2aa844 100644
> --- a/tools/testing/selftests/gpio/Makefile
> +++ b/tools/testing/selftests/gpio/Makefile
> @@ -3,5 +3,6 @@
>  TEST_PROGS := gpio-mockup.sh
>  TEST_FILES := gpio-mockup-sysfs.sh
>  TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
> +CFLAGS += -I../../../../usr/include
>  
>  include ../lib.mk
> -- 
> 2.31.1
> 
> 
> 

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

* Re: [PATCH] selftests/gpio: Fix gpio compiling error
  2021-09-02  9:39 ` Philip Li
@ 2021-09-02  9:40   ` Philip Li
  0 siblings, 0 replies; 4+ messages in thread
From: Philip Li @ 2021-09-02  9:40 UTC (permalink / raw)
  To: Li Zhijian
  Cc: bamv2005, shuah, linux-gpio, linux-kselftest, linux-kernel,
	kernel test robot

On Thu, Sep 02, 2021 at 05:39:18PM +0800, Philip Li wrote:
> applied
sorry, reply the wrong mail, kindly ignore

> On Thu, Sep 02, 2021 at 04:46:35PM +0800, Li Zhijian wrote:
> > [root@iaas-rpma gpio]# make
> > gcc     gpio-mockup-cdev.c  -o /home/lizhijian/linux/tools/testing/selftests/gpio/gpio-mockup-cdev
> > gpio-mockup-cdev.c: In function ‘request_line_v2’:
> > gpio-mockup-cdev.c:24:30: error: storage size of ‘req’ isn’t known
> >    24 |  struct gpio_v2_line_request req;
> >       |                              ^~~
> > gpio-mockup-cdev.c:32:14: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
> >    32 |  if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
> >       |              ^~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > Search headers from linux tree like others, such as sched
> > 
> > CC: Philip Li <philip.li@intel.com>
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> > ---
> >  tools/testing/selftests/gpio/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
> > index 39f2bbe8dd3d..42ea7d2aa844 100644
> > --- a/tools/testing/selftests/gpio/Makefile
> > +++ b/tools/testing/selftests/gpio/Makefile
> > @@ -3,5 +3,6 @@
> >  TEST_PROGS := gpio-mockup.sh
> >  TEST_FILES := gpio-mockup-sysfs.sh
> >  TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
> > +CFLAGS += -I../../../../usr/include
> >  
> >  include ../lib.mk
> > -- 
> > 2.31.1
> > 
> > 
> > 

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

* Re: [PATCH] selftests/gpio: Fix gpio compiling error
  2021-09-02  8:46 [PATCH] selftests/gpio: Fix gpio compiling error Li Zhijian
  2021-09-02  9:39 ` Philip Li
@ 2021-09-02 21:08 ` Shuah Khan
  1 sibling, 0 replies; 4+ messages in thread
From: Shuah Khan @ 2021-09-02 21:08 UTC (permalink / raw)
  To: Li Zhijian, bamv2005, shuah, linux-gpio, linux-kselftest
  Cc: linux-kernel, Philip Li, kernel test robot, Shuah Khan

On 9/2/21 2:46 AM, Li Zhijian wrote:

I like to see the reason for this compile error followed by how
it is fixed.

> [root@iaas-rpma gpio]# make
> gcc     gpio-mockup-cdev.c  -o /home/lizhijian/linux/tools/testing/selftests/gpio/gpio-mockup-cdev
> gpio-mockup-cdev.c: In function ‘request_line_v2’:
> gpio-mockup-cdev.c:24:30: error: storage size of ‘req’ isn’t known
>     24 |  struct gpio_v2_line_request req;
>        |                              ^~~
> gpio-mockup-cdev.c:32:14: error: ‘GPIO_V2_LINE_FLAG_OUTPUT’ undeclared (first use in this function); did you mean ‘GPIOLINE_FLAG_IS_OUT’?
>     32 |  if (flags & GPIO_V2_LINE_FLAG_OUTPUT) {
>        |              ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> Search headers from linux tree like others, such as sched


> 
> CC: Philip Li <philip.li@intel.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
>   tools/testing/selftests/gpio/Makefile | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
> index 39f2bbe8dd3d..42ea7d2aa844 100644
> --- a/tools/testing/selftests/gpio/Makefile
> +++ b/tools/testing/selftests/gpio/Makefile
> @@ -3,5 +3,6 @@
>   TEST_PROGS := gpio-mockup.sh
>   TEST_FILES := gpio-mockup-sysfs.sh
>   TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev
> +CFLAGS += -I../../../../usr/include
>   
>   include ../lib.mk
> 

thanks,
-- Shuah

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

end of thread, other threads:[~2021-09-02 21:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02  8:46 [PATCH] selftests/gpio: Fix gpio compiling error Li Zhijian
2021-09-02  9:39 ` Philip Li
2021-09-02  9:40   ` Philip Li
2021-09-02 21:08 ` Shuah Khan

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).