From patchwork Mon Nov 8 01:28:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 12607503 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF2CFC433F5 for ; Mon, 8 Nov 2021 01:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5E6C613A0 for ; Mon, 8 Nov 2021 01:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235672AbhKHBcT (ORCPT ); Sun, 7 Nov 2021 20:32:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235738AbhKHBcQ (ORCPT ); Sun, 7 Nov 2021 20:32:16 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDBC8C061746; Sun, 7 Nov 2021 17:29:30 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so3347835pjj.0; Sun, 07 Nov 2021 17:29:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0JNyHVD+1yzYEJ3JLaSRpORJwWMNkeDq20AnIcFvt5s=; b=k6BotfM2pSNgoWcsxY0UsqpuveBSB96Sr4cxHSa0Q0M7n5eeMdIeH3dYksvi5Z42mu 8P7vZe6/QrjJUayqUjhL65M/pXmRNf4iI3DokaBQiNHFFZGOdYj0y7zeepPFFX4EKqyF BITF+0h1Ckcp9q3GiEmBJAZWAWZxN52l6bZR3OhQf/rwsNdXI9h+w0Vm8NA+W3MqjM8H fnar/6YqATXA+JW/0uEu+elWqZC1gXMwSjFx7mux1G6GfJISG0ccmuEnBS/drIJ9vq+N Bopf0tmv+z1LcBUYuxSiOPkngGbu/7vkRCCFoCRGXPoV4ak32ZdN1z34JIUPr70+oaS1 S0hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0JNyHVD+1yzYEJ3JLaSRpORJwWMNkeDq20AnIcFvt5s=; b=tHHu2a2jQUnGcq7viLG8mCHBeFVcGnqq13okSZZqh4Jqu+0fcpBAyjLPY5mtiXt6CE nuFQttBs+JlVPBIv4J3N/K8XBPdWHFAqEb7RbOxxc58Ti73ieUx1S6OfAgBBwm/519ps kadyeHs7llj9PRb9PHwbm6FEkpq+pHUa4zjfkmLBE3pH7zcmhZuhOD/qml9ZSvEHLmKb QTazS+p2VW8Y/1mTO35Ki/03m+OfCcOZa6Xuk6ej3PcuHPGa9+Ai6rjlBb6osxVP2NT2 MjcbZrCVQnp92jBI8LCU8jXkS8yQx4O9IXrIkI7MASl+DqRw/7wn/2nE2Lc5XbDJyhw3 s1Sw== X-Gm-Message-State: AOAM533Hij/kwm4DK5kZPXZY5WYhTWgZznqO+eZw464p6m1met+q9Ax9 TzoV5EH9JuISvf4fMQIQqPj7DO9f1gn7Gw== X-Google-Smtp-Source: ABdhPJyVwgGxtocafh4Qw1aloohujgKREoDKJOaxND/DSBjIdQPX7sLx00BtGKgZGsk7MNy3kbhb6A== X-Received: by 2002:a17:902:9a91:b0:138:efd5:7302 with SMTP id w17-20020a1709029a9100b00138efd57302mr66963409plp.35.1636334970050; Sun, 07 Nov 2021 17:29:30 -0800 (PST) Received: from sol.lan (14-201-12-235.tpgi.com.au. [14.201.12.235]) by smtp.gmail.com with ESMTPSA id t4sm13800861pfj.166.2021.11.07.17.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 17:29:29 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kselftest@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, shuah@kernel.org, bamv2005@gmail.com, lizhijian@cn.fujitsu.com Cc: kernel test robot , Kent Gibson Subject: [PATCH 1/3] selftests: gpio: fix gpio compiling error Date: Mon, 8 Nov 2021 09:28:49 +0800 Message-Id: <20211108012851.7772-2-warthog618@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108012851.7772-1-warthog618@gmail.com> References: <20211108012851.7772-1-warthog618@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org From: Li Zhijian The gpio selftests build against the system includes rather than the headers from the linux tree. This results in the compile failing if the system includes are outdated. Prefer the headers from the linux tree, as per other selftests. Fixes: 8bc395a6a2e2 ("selftests: gpio: rework and simplify test implementation") Reported-by: kernel test robot Signed-off-by: Li Zhijian [Kent: reworded commit comment and added Fixes:] Signed-off-by: Kent Gibson --- 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 From patchwork Mon Nov 8 01:28:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 12607505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8765FC433EF for ; Mon, 8 Nov 2021 01:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B473613A0 for ; Mon, 8 Nov 2021 01:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235628AbhKHBc0 (ORCPT ); Sun, 7 Nov 2021 20:32:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbhKHBcZ (ORCPT ); Sun, 7 Nov 2021 20:32:25 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12C2BC061570; Sun, 7 Nov 2021 17:29:42 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id 188so1377263pgb.7; Sun, 07 Nov 2021 17:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o7vm9h0bfl38xYkcjMU2qFVdP2aC2hP2eWsF46t6vK4=; b=Q3k3npeuuSd1ekNv92aYFF+b5wA/w4L0WMj9yP8BZvdD+0E87+aegY24g6e2p5WRFL ubSkbnEUGNHkJDlk31ZyOQLuZPn6FyVlLUmVUtgfroVHm/v8aHIraYcmy0ttJj3tGGtM CQOvE3nKpKp3+GfWO/62HyhLbON9wwpJTU/vvsRDlWGNucgfrx5tJNImnioMM5nfa01/ Q7EBfApdKNX/5RDvVZZl9Td93o17Uwu/Nu3oRFaj0KVc5OwoKJdRtdGsvuuacrH+uu6y OCzHRwZO7/U7044PpUKr5zfw3GO8Y7dS7Gu/dzg+wbHyC07PJUdbxlWxMLwIdlzU2NEP VDMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=o7vm9h0bfl38xYkcjMU2qFVdP2aC2hP2eWsF46t6vK4=; b=oHKGQCEQGpuih4ZHlnF3+hkt3ujlR2s0VV8INqIHDFs1EtuiIPGHO5f/dk+nQvpuDO c3sZAOXSeen5U4WaBHS0wd4jNFLBW+C+CKJZWjsv9Cq/IXSuI+CwN1WWw/kDEwO22Ko3 Bnl85pmMKMvjz7AbFWP0NIE9CR8Ri3VsWQq3mhaoA+aWxYBYd7gvrbzI40jcdVUNOv+J j1XwfxzzlXEH37RXULLzUw9PR3QH9T49UN1RECgEGDA6j2QvuGWvNrEIK2LWCGOAzmkq c0aw5OH8D7qg7IEo3otXdpozNNRtK3yFax7NjfL25KMNMaHiEepBqm6kdI8e6gO18KvM zMbA== X-Gm-Message-State: AOAM532AulcoJE7iLhAo9A3V0RId2o7X0bjMKmrY5yx/JBKuP1R7+yVf cvCrYLUx/ic1vhXyxMF6BErLwWsxSRMoKA== X-Google-Smtp-Source: ABdhPJzRIZ8/7B02z8nwhqAgWLf7RqWVKOWLCCidtufEOReXZPON/TqrCmDsbwcAOgsMZlcmqCaFEw== X-Received: by 2002:a63:2702:: with SMTP id n2mr22999298pgn.319.1636334981281; Sun, 07 Nov 2021 17:29:41 -0800 (PST) Received: from sol.lan (14-201-12-235.tpgi.com.au. [14.201.12.235]) by smtp.gmail.com with ESMTPSA id t4sm13800861pfj.166.2021.11.07.17.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 17:29:40 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kselftest@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, shuah@kernel.org, bamv2005@gmail.com, lizhijian@cn.fujitsu.com Cc: Kent Gibson Subject: [PATCH 2/3] selftests: gpio: fix uninitialised variable warning Date: Mon, 8 Nov 2021 09:28:50 +0800 Message-Id: <20211108012851.7772-3-warthog618@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108012851.7772-1-warthog618@gmail.com> References: <20211108012851.7772-1-warthog618@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When compiled with -Wall gpio-mockup-cdev.c reports an uninitialised variable warning. This is a false positive, as the variable is ignored in the case it is uninitialised, but initialise the variable anyway to remove the warning. Signed-off-by: Kent Gibson --- tools/testing/selftests/gpio/gpio-mockup-cdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/gpio/gpio-mockup-cdev.c b/tools/testing/selftests/gpio/gpio-mockup-cdev.c index e83eac71621a..d1640f44f8ac 100644 --- a/tools/testing/selftests/gpio/gpio-mockup-cdev.c +++ b/tools/testing/selftests/gpio/gpio-mockup-cdev.c @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) { char *chip; int opt, ret, cfd, lfd; - unsigned int offset, val, abiv; + unsigned int offset, val = 0, abiv; uint32_t flags_v1; uint64_t flags_v2; From patchwork Mon Nov 8 01:28:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Gibson X-Patchwork-Id: 12607507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59E8AC433EF for ; Mon, 8 Nov 2021 01:29:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 410D36139E for ; Mon, 8 Nov 2021 01:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235805AbhKHBcd (ORCPT ); Sun, 7 Nov 2021 20:32:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235746AbhKHBcd (ORCPT ); Sun, 7 Nov 2021 20:32:33 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C110C061570; Sun, 7 Nov 2021 17:29:49 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id n8so14739449plf.4; Sun, 07 Nov 2021 17:29:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4vQkz8/qTxyaVcJnsKCjYn20bkfBzjk11/LAmMKs8G8=; b=cVnOCLuY/4b5KleH6K15LMLmcjDuPBXCm2Je0e7arrPgllRLmyI8WPbC0tz27LU7qZ WMIQEQEVpQFBucjcaNX83XUQkDJkk3PZ6Yv24CX1I4L+T92ik0oH11zTJ+PXg9lvGE6m H/X/xZT/6vmCaQbYbzr+yNRuENNC94Z1f9TmXIU3YTh2xKwJi7+xHgGB6Ymtz1xo5bST mCGPfBZ2lhwV6sI1tKZKtUAF0JwJYlnhN1d/0Z/aRLa8Nrdxt5KnOy8HOmmn6Xeufm25 2mnSMvexRyRK6fh+rvXVZrABq73NciZf/GkE39LrQZXlnvzhT5n/+Wh78PxAAO+bdteA vo5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4vQkz8/qTxyaVcJnsKCjYn20bkfBzjk11/LAmMKs8G8=; b=iysn6Ok9yUr3cKoplJ6Dbm1Gmj3nVxRit+aVk8QBsmnXXYlH0tLShndtfmj/Ojb1UB A+nflWfwBK3XFbpfADCEglJufOM3qewdKtvoObdQ7XWO7PKgwgs3MzGQsv0NoNenBdTo wjOuWJWf/A3pfZ6sTWTh2bG+Y4uULyNhhQet806AR9sgB9Y9qjF+T0Bt8ybMYHVM4Mhd U5eh3EpCGydlUOvW93oKEqNoJsNkXyqsoza7+KwIYVPJ+1IkWfEDt78WPtNJRMFSbjep p19Dnv0zd27UtECW42GuWVYuIGz0EqjqtE/cGP4V4uv+FKsyF20cOaDR2B1BKfIUr6wa c5KQ== X-Gm-Message-State: AOAM533zawj+c/vgITscU0n8tYNRxmjp4UjhzCGYIMtl6WZZddXVdE+T NoymuQdkuABypNipRftzfdO/0NnRj3Yukw== X-Google-Smtp-Source: ABdhPJxxL7QOhLDR+/mBpUfVFdvYw0dHURcw0MPeWokwJlcuw3v16O0QJE3TTdDWyXxlaYnOihsfzQ== X-Received: by 2002:a17:90b:3850:: with SMTP id nl16mr48208378pjb.10.1636334988748; Sun, 07 Nov 2021 17:29:48 -0800 (PST) Received: from sol.lan (14-201-12-235.tpgi.com.au. [14.201.12.235]) by smtp.gmail.com with ESMTPSA id t4sm13800861pfj.166.2021.11.07.17.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 17:29:48 -0800 (PST) From: Kent Gibson To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kselftest@vger.kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, shuah@kernel.org, bamv2005@gmail.com, lizhijian@cn.fujitsu.com Cc: Kent Gibson Subject: [PATCH 3/3] selftests: gpio: restore CFLAGS options Date: Mon, 8 Nov 2021 09:28:51 +0800 Message-Id: <20211108012851.7772-4-warthog618@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108012851.7772-1-warthog618@gmail.com> References: <20211108012851.7772-1-warthog618@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org All the CFLAGS options were incorrectly removed in the recent rework of the GPIO selftests. While some of the flags were specific to the old implementation the remainder are still relevant. Restore those options. Signed-off-by: Kent Gibson --- tools/testing/selftests/gpio/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 42ea7d2aa844..d7b312b44a62 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -3,6 +3,6 @@ TEST_PROGS := gpio-mockup.sh TEST_FILES := gpio-mockup-sysfs.sh TEST_GEN_PROGS_EXTENDED := gpio-mockup-cdev -CFLAGS += -I../../../../usr/include +CFLAGS += -O2 -g -Wall -I../../../../usr/include/ include ../lib.mk