Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp28046pxb; Thu, 2 Sep 2021 18:19:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS+QFd7/hOp6aYWfutA/awZV6lzbNetUDKrouOE5TSJtWw7hIAdV/G30I8JCh6LqPrwNA9 X-Received: by 2002:a05:6402:445:: with SMTP id p5mr1246676edw.208.1630631970743; Thu, 02 Sep 2021 18:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630631970; cv=none; d=google.com; s=arc-20160816; b=hO3ZXPwZiTdbzcJXTla55VOmPRtFlZQ4YBGh5y8CUhA6I2JdpJovmVJYMZXUs0FiZD I83G8ppitbBFlatwrx3y2H8i7w9e5R8qbcBGzubQx4RtbH0rxQ3lKFglm4TJ26qdimmf Q0IBr+D6gfWPElKS8T2KoJOKsAN5TBBzymOoDxtKv9Z3i4p4YoM+xmkX6gwWH2iv0K3F xBrKMvcnu5IlRn3NcASIrmppKxB7KEZtmy09xiP0QK2xGJzGIuMbYGANXo1hQt4denQF wJ8CA9UjJPAVJ665k7N6n+4vSViPKHeVvK6GF4ChdqSmzPptu6GdqEieJbq8RsqmNhS5 Oy5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QNlvKyocSbzCvO9CW/S4ozdKVMf5jmvLtYdfRVLUT7M=; b=JEQ0pladSsPK41RAIYPPj8AgvTPuuapV9RTyiRf1y0ASXp0ryhE0uyczTJ+9lcyfqu kdGbEj+sqBUBXb+dJZ0JLs9NFe7ITtdd3tMsfiMtVpBxNLH9smGLagU1GlEAmwVWZ4if R8LnlgSa1J9cWTb8hSDRtCxYKBpG59XOJwf3dx1BHgRZDwYX3aE6HgM7VCTEt/L+4E2s lNSj1EfeCXlnnAmH8B/HT1xdGa/yF7KGvphsCQ+TX3e9IpC8vRT9pcU5O/unc75sCUsF Sb+gFW+ZgNhcE9aTc0HxmKiWz7ru8Qxv1wd95nXhvSJ7PQ6/Jf7Rpu96+IP1wUdkGlvP vi9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="HVStBy/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si3687064edx.229.2021.09.02.18.19.07; Thu, 02 Sep 2021 18:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="HVStBy/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346697AbhIBVJP (ORCPT + 99 others); Thu, 2 Sep 2021 17:09:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346696AbhIBVJH (ORCPT ); Thu, 2 Sep 2021 17:09:07 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A2B8C061575 for ; Thu, 2 Sep 2021 14:08:08 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id b10so4301215ioq.9 for ; Thu, 02 Sep 2021 14:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=QNlvKyocSbzCvO9CW/S4ozdKVMf5jmvLtYdfRVLUT7M=; b=HVStBy/xTTuVL0VzYJJW66/jAWAr/V7lfgEHeKg6iwJ02uaEz6Dc8TIqj9Kq/I0sSJ 3itc1L722n6PfmlUXy+vMKnGA0weFwpA5jvORhsCJzNFjsQGSnP+pqzL0lqxvepcLH8J oFCQPo9L2ibV8EesfKMiiBkVrBA45JJjpG6K4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=QNlvKyocSbzCvO9CW/S4ozdKVMf5jmvLtYdfRVLUT7M=; b=hG6IO2gvdXWI2T0Q8oQxfo3jAfkRqcVGSzJVPC6mfG905taUWVNzpFo7+Yv4ULIlQP rBIqNLzOY2a8CD0tNv1iqxqmtVCfOlIRFWSAd+5YDgAbjbAet+jHR6Lx5YUOnM7Gm8xj EbyOOR+jht7cq3w7/URG9oYgxYjwx2s5LUwrHv4RY3nyMm/DgkUeTpxPndPqMbmP4XkK bPpvidiT9XlvqfugxBlj1JDnaCDvChTzFshohrNQsZ3KLDtivHqhlQq0sVSqhVV1RHGu Gf9Smpf+KMW8rYrdpoYZMS1RT0u622qSoIHJCxEGFL9I+6Kc4q5d+utYXVlAPRwKzxbE jB2Q== X-Gm-Message-State: AOAM531ihhV7K3+N1I3Oq1R/GfQaNhWM9WzIiLQ0DodXwLDA81GMMeWx BD9AMXCEMy0xqYVxWX4mJclh9Q== X-Received: by 2002:a05:6638:1646:: with SMTP id a6mr215464jat.27.1630616887436; Thu, 02 Sep 2021 14:08:07 -0700 (PDT) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id c11sm1469438ilo.57.2021.09.02.14.08.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Sep 2021 14:08:06 -0700 (PDT) Subject: Re: [PATCH] selftests/gpio: Fix gpio compiling error To: Li Zhijian , bamv2005@gmail.com, shuah@kernel.org, linux-gpio@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Philip Li , kernel test robot , Shuah Khan References: <20210902084635.103622-1-lizhijian@cn.fujitsu.com> From: Shuah Khan Message-ID: <22f8bef6-a399-8579-b73a-5c6b96dd6145@linuxfoundation.org> Date: Thu, 2 Sep 2021 15:08:06 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210902084635.103622-1-lizhijian@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reported-by: kernel test robot > Signed-off-by: Li Zhijian > --- > 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