* Re: [PATCH] pci:endpoint Remove redundant returns
[not found] <tencent_1039A1784512AF88CA1844804F7DEC059407@qq.com>
@ 2024-11-04 13:35 ` Krzysztof Wilczyński
2024-11-04 13:53 ` Krzysztof Wilczyński
2024-11-04 23:46 ` Bjorn Helgaas
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-04 13:35 UTC (permalink / raw)
To: 2564278112
Cc: manivannan.sadhasivam, kishon, bhelgaas, cassel, Frank.Li,
dlemoal, jiangwang, linux-pci
Hello,
[+Cc linux-pci mailing list]
> In fact, void function return statements are not generally useful.
... unless used within the code for control flow. :)
> dma_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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pci:endpoint Remove redundant returns
2024-11-04 13:35 ` [PATCH] pci:endpoint Remove redundant returns Krzysztof Wilczyński
@ 2024-11-04 13:53 ` Krzysztof Wilczyński
2024-11-04 23:46 ` Bjorn Helgaas
1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-04 13:53 UTC (permalink / raw)
To: 2564278112
Cc: manivannan.sadhasivam, kishon, bhelgaas, cassel, Frank.Li,
dlemoal, jiangwang, linux-pci
Hello,
> [+Cc linux-pci mailing list]
>
> > In fact, void function return statements are not generally useful.
>
> ... unless used within the code for control flow. :)
>
> > dma_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").
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pci:endpoint Remove redundant returns
2024-11-04 13:35 ` [PATCH] pci:endpoint Remove redundant returns Krzysztof Wilczyński
2024-11-04 13:53 ` Krzysztof Wilczyński
@ 2024-11-04 23:46 ` Bjorn Helgaas
2024-11-05 0:43 ` Krzysztof Wilczyński
1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2024-11-04 23:46 UTC (permalink / raw)
To: Krzysztof Wilczyński
Cc: 2564278112, manivannan.sadhasivam, kishon, bhelgaas, cassel,
Frank.Li, dlemoal, jiangwang, linux-pci
On Mon, Nov 04, 2024 at 10:35:00PM +0900, Krzysztof Wilczyński wrote:
> 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 linux-pci@vger.kernel.org.
> > In fact, void function return statements are not generally useful.
>
> ... unless used within the code for control flow. :)
>
> > dma_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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pci:endpoint Remove redundant returns
2024-11-04 23:46 ` Bjorn Helgaas
@ 2024-11-05 0:43 ` Krzysztof Wilczyński
2024-11-05 8:50 ` Krzysztof Wilczyński
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-05 0:43 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: 2564278112, manivannan.sadhasivam, kishon, bhelgaas, cassel,
Frank.Li, dlemoal, jiangwang, linux-pci
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.
Patch for reference:
From: Wang Jiang <jiangwang@kylinos.cn>
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.
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
> Please post all PCI-related patches to linux-pci@vger.kernel.org.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] pci:endpoint Remove redundant returns
2024-11-05 0:43 ` Krzysztof Wilczyński
@ 2024-11-05 8:50 ` Krzysztof Wilczyński
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Wilczyński @ 2024-11-05 8:50 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: 2564278112, manivannan.sadhasivam, kishon, bhelgaas, cassel,
Frank.Li, dlemoal, jiangwang, linux-pci
Hello,
[...]
> 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/tencent_F250BEE2A65745A524E2EFE70CF615CA8F06@qq.com
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-05 8:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <tencent_1039A1784512AF88CA1844804F7DEC059407@qq.com>
2024-11-04 13:35 ` [PATCH] pci:endpoint Remove redundant returns Krzysztof Wilczyński
2024-11-04 13:53 ` Krzysztof Wilczyński
2024-11-04 23:46 ` Bjorn Helgaas
2024-11-05 0:43 ` Krzysztof Wilczyński
2024-11-05 8:50 ` 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