pci:endpoint Remove redundant returns
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
[+Cc linux-pci mailing list]
Quoted 1 line
In fact, void function return statements are not generally useful.
... unless used within the code for control flow. :)
Review
Quoted 4 lines
(quoted diff) +0
-2dma_release_channel(epf_test->dma_chan_rx); epf_test->dma_chan_rx = NULL; - - return;
Makes sense.
For reference, this surplus return statement was added in the commit 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities").
Krzysztof
Krzysztof Wilczyński
AppliedHello,
Quoted 13 lines
[+Cc linux-pci mailing list]
Quoted 1 line
In fact, void function return statements are not generally useful.
... unless used within the code for control flow. :)
Review
Quoted 4 lines
(quoted diff) +0
-2dma_release_channel(epf_test->dma_chan_rx); epf_test->dma_chan_rx = NULL; - - return;Makes sense.
Quoted 3 lines
For reference, this surplus return statement was added in the commit
8353813c88ef("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities").
Applied to endpoint, thank you!
[01/01] PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan()
https://git.kernel.org/pci/pci/c/3fdf564b21d3 Krzysztof
Quoted 3 lines · Krzysztof Wilczyński
Hello,
[+Cc linux-pci mailing list]
Where did this patch come from? I don't see it on the mailing list, so there's no signed-off-by chain for it, and the Link in the commit doesn't go to the patch posting.
Please post all PCI-related patches to [email protected].
Quoted 16 lines
Quoted 1 line
In fact, void function return statements are not generally useful.
... unless used within the code for control flow. :)
Review
Quoted 4 lines
(quoted diff) +0
-2dma_release_channel(epf_test->dma_chan_rx); epf_test->dma_chan_rx = NULL; - - return;Makes sense.
For reference, this surplus return statement was added in the commit
8353813c88ef("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities").Krzysztof
Hello,
Quoted 5 lines
Quoted 1 line
[+Cc linux-pci mailing list]
Where did this patch come from? I don't see it on the mailing list, so there's no signed-off-by chain for it, and the Link in the commit doesn't go to the patch posting.
Patch for reference:
From: Wang Jiang <[email protected]>
We get 1 warnings when building kernel withW=1:
296: FILE: ./drivers/pci/endpoint/functions/pci-epf-test.c:296:
return;
In fact, void function return statements are not generally useful.
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 7c2ed6eae53a..cfdb38cd8cd7 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -291,8 +291,6 @@ static void pci_epf_test_clean_dma_chan(struct pci_epf_test *epf_test)
dma_release_channel(epf_test->dma_chan_rx); epf_test->dma_chan_rx = NULL; - - return; }
static void pci_epf_test_print_rate(struct pci_epf_test *epf_test,
--
2.25.1
Quoted 1 line
Please post all PCI-related patches to [email protected].
Tentatively dropped. I will wait for the author to post the patch again, hopefully including the mailing list now.
Jiang, please resend your patch again adding the mailing list, so we can pick it up.
The process to follow is outlined here:
- https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Thank you!
Krzysztof
Hello,
[...]
Quoted 5 lines
Tentatively dropped. I will wait for the author to post the patch again, hopefully including the mailing list now.
Jiang, please resend your patch again adding the mailing list, so we can pick it up.
Follow up:
- https://lore.kernel.org/linux-pci/[email protected]
Krzysztof