linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: kishon@ti.com, lpieralisi@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, mie@igel.co.jp, kw@linux.com,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 2/5] tools: PCI: Fix parsing the return value of IOCTLs
Date: Wed, 24 Aug 2022 19:58:21 +0530	[thread overview]
Message-ID: <20220824142821.GC4767@thinkpad> (raw)
In-Reply-To: <YwYdFt6sc7lZGRcg@kroah.com>

On Wed, Aug 24, 2022 at 02:44:06PM +0200, Greg KH wrote:
> On Wed, Aug 24, 2022 at 06:00:07PM +0530, Manivannan Sadhasivam wrote:
> > "pci_endpoint_test" driver now returns 0 for success and negative error
> > code for failure. So adapt to the change by reporting FAILURE if the
> > return value is < 0, and SUCCESS otherwise.
> > 
> > Cc: stable@vger.kernel.org #5.10
> > Fixes: 3f2ed8134834 ("tools: PCI: Add a userspace tool to test PCI endpoint")
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  tools/pci/pcitest.c | 41 +++++++++++++++++++++--------------------
> >  1 file changed, 21 insertions(+), 20 deletions(-)
> > 
> > diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
> > index 441b54234635..a4e5b17cc3b5 100644
> > --- a/tools/pci/pcitest.c
> > +++ b/tools/pci/pcitest.c
> > @@ -18,7 +18,6 @@
> >  
> >  #define BILLION 1E9
> >  
> > -static char *result[] = { "NOT OKAY", "OKAY" };
> >  static char *irq[] = { "LEGACY", "MSI", "MSI-X" };
> >  
> >  struct pci_test {
> > @@ -54,9 +53,9 @@ 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, "FAILED\n");
> >  		else
> > -			fprintf(stdout, "%s\n", result[ret]);
> > +			fprintf(stdout, "SUCCESS\n");
> 
> Is this following the kernel TAP output rules?  If not, why not?  If so,

It is not following the TAP rules currently as I was not aware of it. Now that
you pointed out, I'll try to adapt to it.

Thanks,
Mani

> say that you are fixing that issue up in the changelog text.
> 
> thanks,
> 
> greg k-h

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2022-08-24 14:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:30 [PATCH v2 0/5] pci_endpoint_test: Fix the return value of IOCTLs Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 1/5] misc: pci_endpoint_test: Fix the return value of IOCTL Manivannan Sadhasivam
2022-08-24 12:43   ` Greg KH
2022-08-24 14:25     ` Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 2/5] tools: PCI: Fix parsing the return value of IOCTLs Manivannan Sadhasivam
2022-08-24 12:44   ` Greg KH
2022-08-24 14:28     ` Manivannan Sadhasivam [this message]
2022-11-01 14:15     ` Manivannan Sadhasivam
2022-11-01 17:11       ` Greg KH
2022-08-24 12:30 ` [PATCH v2 3/5] Documentation: PCI: endpoint: Use the correct return value of pcitest.sh Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 4/5] misc: pci_endpoint_test: Remove unnecessary WARN_ON Manivannan Sadhasivam
2022-08-24 12:30 ` [PATCH v2 5/5] tools: PCI: Fix memory leak Manivannan Sadhasivam
2022-09-09 13:09 ` [PATCH v2 0/5] pci_endpoint_test: Fix the return value of IOCTLs Lorenzo Pieralisi
2022-11-01 14:03   ` Manivannan Sadhasivam

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=20220824142821.GC4767@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mie@igel.co.jp \
    --cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).