From patchwork Thu Sep 2 08:46:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Li Zhijian X-Patchwork-Id: 506801 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5572DC432BE for ; Thu, 2 Sep 2021 08:41:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3542861051 for ; Thu, 2 Sep 2021 08:41:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243655AbhIBImq (ORCPT ); Thu, 2 Sep 2021 04:42:46 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:35308 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233362AbhIBImq (ORCPT ); Thu, 2 Sep 2021 04:42:46 -0400 IronPort-HdrOrdr: A9a23:vw/ria3LZLj8maIxy2eP8gqjBIAkLtp133Aq2lEZdPUMSL38qyiv9M516faGskd0ZJhAo6H5BEDuewK+yXcY2+Qs1NSZLXLbUQmTXeNfBOLZqlWKcREWndQy6U4USchD4arLbGSS4/yX3ODyKadG/DDOytHPuQ7x9QYVcT1X X-IronPort-AV: E=Sophos;i="5.84,371,1620662400"; d="scan'208";a="113896117" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 02 Sep 2021 16:41:46 +0800 Received: from G08CNEXMBPEKD04.g08.fujitsu.local (unknown [10.167.33.201]) by cn.fujitsu.com (Postfix) with ESMTP id 8B52F4D0D9DC; Thu, 2 Sep 2021 16:41:45 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD04.g08.fujitsu.local (10.167.33.201) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 2 Sep 2021 16:41:40 +0800 Received: from localhost.localdomain (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Thu, 2 Sep 2021 16:41:39 +0800 From: Li Zhijian To: , , , CC: , Li Zhijian , Philip Li , kernel test robot Subject: [PATCH] selftests/gpio: Fix gpio compiling error Date: Thu, 2 Sep 2021 16:46:35 +0800 Message-ID: <20210902084635.103622-1-lizhijian@cn.fujitsu.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-yoursite-MailScanner-ID: 8B52F4D0D9DC.AECA9 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: lizhijian@fujitsu.com Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org [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