Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp549615rwe; Wed, 24 Aug 2022 05:36:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR57NF1F0yFDfoKHvpQedDa5EbeNSh35hPGbZf1wGVcHaUOkuTYq/BVcKzERgCcWFUJYoXIQ X-Received: by 2002:a17:90b:38cb:b0:1fb:7591:a432 with SMTP id nn11-20020a17090b38cb00b001fb7591a432mr5372060pjb.219.1661344574011; Wed, 24 Aug 2022 05:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661344574; cv=none; d=google.com; s=arc-20160816; b=Chf98nM3YQCUQo4nP5RYBfpROuQW2f1rCEiZhughu6PyaDBhpKfOdzZaJ8oFIIM1ZF ZutKrd7S8AJIjiLiGpucvKHi5lCr4flfBvgNYHFooMPwcvmR7HYFawzUNMSxfARGkrPx diolUBdEwpAVqU8l/UbeoR/oZWSZkl23jQAqjiKIUZ0Lc3A5sd91yYJY3kuVVS7kQjpf 2yY99WQPqI/SHczWCuQZuqOuB8f9FID8JYqO5yWMjfUwzsHKl0tBwkvBTYbKAEcGqt35 ksHCFsCLLpwHv3VoLqk1V8k59HMufEjSfOZs2lTuss8c8tVEhWkOwe25/ytTKcKrYOuf WIyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=lTq05bQ1OKgNVfwpDwHO25M6SddSlDeTyGdeeuSYq38=; b=ivGhcRrN1CuiWUNm+rWNVfCZFeN/cMKDSXcr5bUXCRnTBFw7Mgmet5uIXvUXfx1WOx 5k/gCga/RqOIbz8+PfKp30ESSQDFsUe39ueSS1pnegBUXZI18eIt2v1myA74MLWpFlWd zDFYhmbKVbAOtoAq0OLUKIJE0gq+BcGMVtZzNKfYgJNGczQBNKrvnCwSvy7RKlR7RS0i 7L6A5eZlopbN9L+f5OdkwD5Ni4CcA6WJDmdwJSdJEwtn3TxWlYM6mi1ftqj4vOIypces kZawhs3h2ZQVko9RQOIkTDEhFe/Wu6k3Vtp9egx2H4KA5i9Snsw+Hwt9Usu2fdzeK8xA 0VAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WyIluVrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a170902ea0400b00171554b0e73si19255684plg.361.2022.08.24.05.35.52; Wed, 24 Aug 2022 05:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WyIluVrr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237449AbiHXMaa (ORCPT + 99 others); Wed, 24 Aug 2022 08:30:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237247AbiHXMaV (ORCPT ); Wed, 24 Aug 2022 08:30:21 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E95D23F1FD for ; Wed, 24 Aug 2022 05:30:19 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id bf22so16863331pjb.4 for ; Wed, 24 Aug 2022 05:30:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=lTq05bQ1OKgNVfwpDwHO25M6SddSlDeTyGdeeuSYq38=; b=WyIluVrrWEn0m/dxKECPZMN1MjW96MEQ6xtJw5kNo8GII3mlN9wXxjQtk3PdhhaxQW xKyi7HsXS36xIqfZ/mmgjKAxY3MTOUvntjjxHwrTjd9kgvbAVWhyRZwGfbYtObWsUD2r r2SXCYIELN7Jc/YgtBLEWKp/LQjAxZJaxFSgFozwOsR5Y+YSN9gn4bs8EYXOjaPjkGcg PxCamYjPckL5Akc36wPkha+b7Zv3GLrgUXLtdlOPO11Kwngn+OGr95XilNwnsfUAYsZb juAXjm0Of3/QiuLd33Ou9EZl5tx9w+uOrS/HEidBDdDSYe2e98U8uuN5Yq+7XI05ifCc Htog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=lTq05bQ1OKgNVfwpDwHO25M6SddSlDeTyGdeeuSYq38=; b=KM44dokrXxxbg5qoVom4jmJbbt1VFNDZnXakYUZUTmelYccbp9ZUDrCOxkRFVcTBD4 mCLS55uj6JLvJXDCKTA+xue/2vm2htk+55jF8gd0t2kMl1kr+6rxUPxu/k+RaeGN4QSh jh3Af/QvO0aNwHZVU7ZmzmcTrn77SL4sPc79BsX3OAIgLFGUg1XxfhxhIh2df56L7bYD 8HV2sneIskvSNQb+qK8mP1bRgkb6R90GztAjjEw3XkC5yZVQXubbkjuTKDhWDvN4E1Zx dfC+XmSLWubgPP1BI0/aaNb5iK905dl1ZUYVM44QW9ZDjHYG2iZI7iG86v53lcj5GrfH gScA== X-Gm-Message-State: ACgBeo3U3ATyMuT3NOQkMozmzdREFaayqrN3NGApEqOzRaBpzX0nWbW/ wCmBUy9xaGrz7Y6yCe7Qhe8U X-Received: by 2002:a17:902:6542:b0:172:95d8:a777 with SMTP id d2-20020a170902654200b0017295d8a777mr28453985pln.61.1661344219362; Wed, 24 Aug 2022 05:30:19 -0700 (PDT) Received: from localhost.localdomain ([117.207.24.28]) by smtp.gmail.com with ESMTPSA id b3-20020a1709027e0300b00173031308fdsm3539220plm.158.2022.08.24.05.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 05:30:18 -0700 (PDT) From: Manivannan Sadhasivam To: kishon@ti.com, gregkh@linuxfoundation.org, lpieralisi@kernel.org Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, mie@igel.co.jp, kw@linux.com, Manivannan Sadhasivam Subject: [PATCH v2 0/5] pci_endpoint_test: Fix the return value of IOCTLs Date: Wed, 24 Aug 2022 18:00:05 +0530 Message-Id: <20220824123010.51763-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During the review of a patch for pci_endpoint_test driver [1], Greg spotted the wrong usage of the return value of IOCTLs in the driver. This series fixes that by returning 0 for success and negative error code for failure. Relevant change is also made to the userspace tool and the Documentation. Along with those, there are couple more patches fixing other small issues I noted. NOTE: I have just compile tested this series. So it'd be good if someone can test it on the PCI endpoint setup. Thanks, Mani [1] https://lore.kernel.org/all/20220816100617.90720-1-mie@igel.co.jp/ Changes in v2: * Fixed the error numbers in pci_endpoint_test * Added Fixes tag and CCed stable list for relevant patches. The patches should get backported until 5.10 kernel only. Since for the LTS kernels before that, the pci_endpoint_test driver was not supporting all commands. Manivannan Sadhasivam (5): misc: pci_endpoint_test: Fix the return value of IOCTL tools: PCI: Fix parsing the return value of IOCTLs Documentation: PCI: endpoint: Use the correct return value of pcitest.sh misc: pci_endpoint_test: Remove unnecessary WARN_ON tools: PCI: Fix memory leak Documentation/PCI/endpoint/pci-test-howto.rst | 152 ++++++++-------- drivers/misc/pci_endpoint_test.c | 167 ++++++++---------- tools/pci/pcitest.c | 48 ++--- 3 files changed, 179 insertions(+), 188 deletions(-) -- 2.25.1