]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: epf-test: Cleanup request result handling
authorDamien Le Moal <dlemoal@kernel.org>
Sat, 15 Apr 2023 02:35:36 +0000 (11:35 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 23 Jun 2023 20:02:49 +0000 (15:02 -0500)
commit2eec4bec3574ce1a8b0fcf568cebc82c1ad7ec80
tree25347ea9606719958acc5ca8f73af99b66316f4c
parent96d513f5ed4cafafa31ed99f74ad527f6b0ff47b
PCI: epf-test: Cleanup request result handling

Each of the test functions pci_epf_test_write(), pci_epf_test_read() and
pci_epf_test_copy() return an int result which is used by
pci_epf_test_cmd_handler() to set a success or error bit in the request
status.

In the spirit of keeping the processing of each test case self-contained
within its own test function, move the request status field update from
pci_epf_test_cmd_handler() to each of these test functions and change these
functions declaration to returning void.

Link: https://lore.kernel.org/r/20230415023542.77601-12-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
drivers/pci/endpoint/functions/pci-epf-test.c