mbox series

[v2,0/5] pci_endpoint_test: Fix the return value of IOCTLs

Message ID 20220824123010.51763-1-manivannan.sadhasivam@linaro.org (mailing list archive)
Headers show
Series pci_endpoint_test: Fix the return value of IOCTLs | expand

Message

Manivannan Sadhasivam Aug. 24, 2022, 12:30 p.m. UTC
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(-)

Comments

Lorenzo Pieralisi Sept. 9, 2022, 1:09 p.m. UTC | #1
On Wed, Aug 24, 2022 at 06:00:05PM +0530, Manivannan Sadhasivam wrote:
> 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(-)

May I ask where are we with this thread ? I have noticed some key
comments from Greg that need addressing so I'd expect a new version.

Thanks,
Lorenzo
Manivannan Sadhasivam Nov. 1, 2022, 2:03 p.m. UTC | #2
On Fri, Sep 09, 2022 at 03:09:58PM +0200, Lorenzo Pieralisi wrote:
> On Wed, Aug 24, 2022 at 06:00:05PM +0530, Manivannan Sadhasivam wrote:
> > 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(-)
> 
> May I ask where are we with this thread ? I have noticed some key
> comments from Greg that need addressing so I'd expect a new version.
> 

Sorry for the late response. Yes, there will be a new version.

Thanks,
Mani

> Thanks,
> Lorenzo