public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	kw@linux.com, gregkh@linuxfoundation.org, arnd@arndb.de,
	lpieralisi@kernel.org, shuah@kernel.org
Cc: kishon@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, bhelgaas@google.com,
	linux-arm-msm@vger.kernel.org, robh@kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v3 2/4] misc: pci_endpoint_test: Fix the return value of IOCTL
Date: Wed, 11 Dec 2024 17:37:27 +0900	[thread overview]
Message-ID: <1bd6ea1e-a5d7-400b-bed7-d9ff7163e960@kernel.org> (raw)
In-Reply-To: <20241211080105.11104-3-manivannan.sadhasivam@linaro.org>

On 12/11/24 5:01 PM, Manivannan Sadhasivam wrote:
>  struct pci_test {
> @@ -52,63 +51,65 @@ static int run_test(struct pci_test *test)
>  		ret = ioctl(fd, PCITEST_BAR, test->barnum);
>  		fprintf(stdout, "BAR%d:\t\t", test->barnum);
>  		if (ret < 0)
> -			fprintf(stdout, "TEST FAILED\n");
> +			fprintf(stdout, "NOT OKAY\n");
>  		else
> -			fprintf(stdout, "%s\n", result[ret]);
> +			fprintf(stdout, "OKAY\n");

Why not simplify as I suggested to avoid all these repetitive (and ugly) "if ()
else" ?


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2024-12-11  8:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11  8:01 [PATCH v3 0/4] Migrate PCI Endpoint Subsystem tests to Kselftest Manivannan Sadhasivam
2024-12-11  8:01 ` [PATCH v3 1/4] PCI: qcom-ep: Mark BAR0/BAR2 as 64bit BARs and BAR1/BAR3 as RESERVED Manivannan Sadhasivam
2024-12-11  8:01 ` [PATCH v3 2/4] misc: pci_endpoint_test: Fix the return value of IOCTL Manivannan Sadhasivam
2024-12-11  8:37   ` Damien Le Moal [this message]
2024-12-11  9:19     ` Manivannan Sadhasivam
2024-12-11  8:01 ` [PATCH v3 3/4] selftests: Move PCI Endpoint tests from tools/pci to Kselftests Manivannan Sadhasivam
2024-12-11  8:01 ` [PATCH v3 4/4] selftests: pci_endpoint: Migrate to Kselftest framework Manivannan Sadhasivam
2024-12-12  9:25 ` [PATCH v3 0/4] Migrate PCI Endpoint Subsystem tests to Kselftest Niklas Cassel
2024-12-16  6:03   ` Manivannan Sadhasivam
2024-12-18  9:19     ` Niklas Cassel
2024-12-19  0:01 ` Krzysztof Wilczyński
2024-12-19 14:31   ` Niklas Cassel
2024-12-19 15:55     ` Krzysztof Wilczyński
2024-12-19 20:17       ` Niklas Cassel

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=1bd6ea1e-a5d7-400b-bed7-d9ff7163e960@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox