All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Li Zhijian <lizhijian@cn.fujitsu.com>,
	bamv2005@gmail.com, shuah@kernel.org, linux-gpio@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Philip Li <philip.li@intel.com>,
	kernel test robot <lkp@intel.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/gpio: Fix gpio compiling error
Date: Thu, 2 Sep 2021 15:08:06 -0600	[thread overview]
Message-ID: <22f8bef6-a399-8579-b73a-5c6b96dd6145@linuxfoundation.org> (raw)
In-Reply-To: <20210902084635.103622-1-lizhijian@cn.fujitsu.com>

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

      parent reply	other threads:[~2021-09-02 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22f8bef6-a399-8579-b73a-5c6b96dd6145@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=bamv2005@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=lkp@intel.com \
    --cc=philip.li@intel.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.