* [PATCH v2] PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan()
[not found] <=20241105004311.GB1614659@rocinante>
@ 2024-11-05 2:55 ` 2564278112
2024-11-05 9:19 ` Krzysztof Wilczyński
0 siblings, 1 reply; 2+ messages in thread
From: 2564278112 @ 2024-11-05 2:55 UTC (permalink / raw)
To: manivannan.sadhasivam, kw, kishon, bhelgaas, cassel, Frank.Li, dlemoal
Cc: jiangwang, linux-pci, linux-kernel
From: Wang Jiang <jiangwang@kylinos.cn>
Remove a surplus return statement from the void function that has been
added in the commit commit 8353813c88ef ("PCI: endpoint: Enable DMA
tests for endpoints with DMA capabilities").
Especially, as an empty return statements at the end of a void functions
serve little purpose.
Otherwise, a warning will be issued when building the kernel with W=1:
296: FILE: ./drivers/pci/endpoint/functions/pci-epf-test.c:296:
return;
Signed-off-by: Wang Jiang <jiangwang@kylinos.cn>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan()
2024-11-05 2:55 ` [PATCH v2] PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan() 2564278112
@ 2024-11-05 9:19 ` Krzysztof Wilczyński
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-05 9:19 UTC (permalink / raw)
To: 2564278112
Cc: manivannan.sadhasivam, kishon, bhelgaas, cassel, Frank.Li,
dlemoal, jiangwang, linux-pci, linux-kernel
Hello,
> Remove a surplus return statement from the void function that has been
> added in the commit commit 8353813c88ef ("PCI: endpoint: Enable DMA
> tests for endpoints with DMA capabilities").
>
> Especially, as an empty return statements at the end of a void functions
> serve little purpose.
>
> Otherwise, a warning will be issued when building the kernel with W=1:
>
> 296: FILE: ./drivers/pci/endpoint/functions/pci-epf-test.c:296:
> return;
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/06f893055382
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-05 9:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <=20241105004311.GB1614659@rocinante>
2024-11-05 2:55 ` [PATCH v2] PCI: endpoint: Remove surplus return statement from pci_epf_test_clean_dma_chan() 2564278112
2024-11-05 9:19 ` Krzysztof Wilczyński
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®