[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241211091943.iwgv5etrod7mc5fy@thinkpad>
Date: Wed, 11 Dec 2024 14:49:43 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: kw@...ux.com, gregkh@...uxfoundation.org, arnd@...db.de,
lpieralisi@...nel.org, shuah@...nel.org, kishon@...nel.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
bhelgaas@...gle.com, linux-arm-msm@...r.kernel.org, robh@...nel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3 2/4] misc: pci_endpoint_test: Fix the return value of
IOCTL
On Wed, Dec 11, 2024 at 05:37:27PM +0900, Damien Le Moal wrote:
> 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" ?
>
I've replied to your suggestion in v2:
https://lore.kernel.org/linux-pci/20241211074757.byc5jqpgfe3otjh7@thinkpad/
Since the test is migrated to Kselftest right after this patch, I see no
incentive to simplify the code.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists