* [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
@ 2024-12-21 3:00 Mohamed Khalfella
2024-12-21 8:24 ` Niklas Cassel
2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
0 siblings, 2 replies; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-21 3:00 UTC (permalink / raw)
To: Manivannan Sadhasivam, Krzysztof Wilczyński,
Kishon Vijay Abraham I, Bjorn Helgaas, Niklas Cassel, Frank Li,
Damien Le Moal, Mohamed Khalfella, Wang Jiang
Cc: Krzysztof Wilczyński, linux-pci, linux-kernel
Fixed a small bug in pci-epf-test driver. When requesting TX DMA channel
fails, free already allocated RX channel and set it to NULL.
Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index ef6677f34116..d90c8be7371e 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
fail_back_rx:
dma_release_channel(epf_test->dma_chan_rx);
- epf_test->dma_chan_tx = NULL;
+ epf_test->dma_chan_rx = NULL;
fail_back_tx:
dma_cap_zero(mask);
--
2.45.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
2024-12-21 3:00 [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Mohamed Khalfella
@ 2024-12-21 8:24 ` Niklas Cassel
2024-12-21 17:34 ` [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after " Mohamed Khalfella
2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
1 sibling, 1 reply; 12+ messages in thread
From: Niklas Cassel @ 2024-12-21 8:24 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: Manivannan Sadhasivam, Krzysztof Wilczyński,
Kishon Vijay Abraham I, Bjorn Helgaas, Frank Li, Damien Le Moal,
Wang Jiang, Krzysztof Wilczyński, linux-pci, linux-kernel
Hello Mohamed,
in subject s/aftre/after/
On Fri, Dec 20, 2024 at 07:00:00PM -0800, Mohamed Khalfella wrote:
> Fixed a small bug in pci-epf-test driver. When requesting TX DMA channel
> fails, free already allocated RX channel and set it to NULL.
>
Commit messages should be written in imperative.
I.e. "Fix .." instead of Fixed .."
> Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
>
There should be no empty line between the Fixes: tag and your
Signed-off-by: tag, see:
https://docs.kernel.org/process/submitting-patches.html
With the three comments fixed, feel free to add:
Reviewed-by: Niklas Cassel <cassel@kernel.org>
when sending out V2.
> Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
> ---
> drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index ef6677f34116..d90c8be7371e 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
>
> fail_back_rx:
> dma_release_channel(epf_test->dma_chan_rx);
> - epf_test->dma_chan_tx = NULL;
> + epf_test->dma_chan_rx = NULL;
>
> fail_back_tx:
> dma_cap_zero(mask);
> --
> 2.45.2
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
2024-12-21 8:24 ` Niklas Cassel
@ 2024-12-21 17:34 ` Mohamed Khalfella
2024-12-26 16:31 ` Manivannan Sadhasivam
0 siblings, 1 reply; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-21 17:34 UTC (permalink / raw)
To: Manivannan Sadhasivam, Krzysztof Wilczyński,
Kishon Vijay Abraham I, Bjorn Helgaas, Niklas Cassel, Frank Li,
Damien Le Moal, Mohamed Khalfella, Wang Jiang
Cc: Krzysztof Wilczyński, linux-pci, linux-kernel
Fix a small bug in pci-epf-test driver. When requesting TX DMA channel
fails, free already allocated RX channel and set it to NULL.
Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index ef6677f34116..d90c8be7371e 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
fail_back_rx:
dma_release_channel(epf_test->dma_chan_rx);
- epf_test->dma_chan_tx = NULL;
+ epf_test->dma_chan_rx = NULL;
fail_back_tx:
dma_cap_zero(mask);
--
2.45.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
2024-12-21 3:00 [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Mohamed Khalfella
2024-12-21 8:24 ` Niklas Cassel
@ 2024-12-21 19:18 ` Markus Elfring
2024-12-21 20:00 ` Mohamed Khalfella
1 sibling, 1 reply; 12+ messages in thread
From: Markus Elfring @ 2024-12-21 19:18 UTC (permalink / raw)
To: Mohamed Khalfella, linux-pci, Bjorn Helgaas, Damien Le Moal,
Frank Li, Kishon Vijay Abraham I, Krzysztof Wilczyński,
Manivannan Sadhasivam, Niklas Cassel, Wang Jiang
Cc: LKML, Krzysztof Wilczyński
> Fixed a small bug in pci-epf-test driver. …
Please avoid a typo in the summary phrase for the final commit.
Regards,
Markus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
@ 2024-12-21 20:00 ` Mohamed Khalfella
0 siblings, 0 replies; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-21 20:00 UTC (permalink / raw)
To: Markus Elfring
Cc: linux-pci, Bjorn Helgaas, Damien Le Moal, Frank Li,
Kishon Vijay Abraham I, Krzysztof Wilczyński,
Manivannan Sadhasivam, Niklas Cassel, Wang Jiang, LKML,
Krzysztof Wilczyński
On 2024-12-21 20:18:24 +0100, Markus Elfring wrote:
> > Fixed a small bug in pci-epf-test driver. …
>
> Please avoid a typo in the summary phrase for the final commit.
"Fixed" was changed to "Fix" in v2 of this patch. Does the typo still
exist in v2? If so, please point it out.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
2024-12-21 17:34 ` [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after " Mohamed Khalfella
@ 2024-12-26 16:31 ` Manivannan Sadhasivam
2024-12-26 17:51 ` Mohamed Khalfella
0 siblings, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-26 16:31 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: Krzysztof Wilczyński, Kishon Vijay Abraham I, Bjorn Helgaas,
Niklas Cassel, Frank Li, Damien Le Moal, Wang Jiang,
Krzysztof Wilczyński, linux-pci, linux-kernel
On Sat, Dec 21, 2024 at 09:34:42AM -0800, Mohamed Khalfella wrote:
> Fix a small bug in pci-epf-test driver. When requesting TX DMA channel
> fails, free already allocated RX channel and set it to NULL.
>
Patch description should accurately describe what the patch does. Here, the
patch is fixing the NULL ptr assignment to dma_chan_rx pointer and that's it.
Reword it as such.
- Mani
> Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
> Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
> ---
> drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index ef6677f34116..d90c8be7371e 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
>
> fail_back_rx:
> dma_release_channel(epf_test->dma_chan_rx);
> - epf_test->dma_chan_tx = NULL;
> + epf_test->dma_chan_rx = NULL;
>
> fail_back_tx:
> dma_cap_zero(mask);
> --
> 2.45.2
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
2024-12-26 16:31 ` Manivannan Sadhasivam
@ 2024-12-26 17:51 ` Mohamed Khalfella
2024-12-27 13:59 ` Manivannan Sadhasivam
0 siblings, 1 reply; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-26 17:51 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Krzysztof Wilczyński, Kishon Vijay Abraham I, Bjorn Helgaas,
Niklas Cassel, Frank Li, Damien Le Moal, Wang Jiang,
Krzysztof Wilczyński, linux-pci, linux-kernel
On 2024-12-26 22:01:21 +0530, Manivannan Sadhasivam wrote:
> On Sat, Dec 21, 2024 at 09:34:42AM -0800, Mohamed Khalfella wrote:
> > Fix a small bug in pci-epf-test driver. When requesting TX DMA channel
> > fails, free already allocated RX channel and set it to NULL.
> >
>
> Patch description should accurately describe what the patch does. Here, the
> patch is fixing the NULL ptr assignment to dma_chan_rx pointer and that's it.
>
> Reword it as such.
PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
When allocating dma_chan_tx fails set dma_chan_rx to NULL after it is
freed.
How about the updated subject line and commit message above?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
2024-12-26 17:51 ` Mohamed Khalfella
@ 2024-12-27 13:59 ` Manivannan Sadhasivam
2024-12-27 16:08 ` [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Mohamed Khalfella
0 siblings, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-27 13:59 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: Krzysztof Wilczyński, Kishon Vijay Abraham I, Bjorn Helgaas,
Niklas Cassel, Frank Li, Damien Le Moal, Wang Jiang,
Krzysztof Wilczyński, linux-pci, linux-kernel
On Thu, Dec 26, 2024 at 09:51:37AM -0800, Mohamed Khalfella wrote:
> On 2024-12-26 22:01:21 +0530, Manivannan Sadhasivam wrote:
> > On Sat, Dec 21, 2024 at 09:34:42AM -0800, Mohamed Khalfella wrote:
> > > Fix a small bug in pci-epf-test driver. When requesting TX DMA channel
> > > fails, free already allocated RX channel and set it to NULL.
> > >
> >
> > Patch description should accurately describe what the patch does. Here, the
> > patch is fixing the NULL ptr assignment to dma_chan_rx pointer and that's it.
> >
> > Reword it as such.
>
> PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
>
> When allocating dma_chan_tx fails set dma_chan_rx to NULL after it is
> freed.
>
s/"When allocating dma_chan_tx fails"/"If dma_chan_tx allocation fails,"
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
2024-12-27 13:59 ` Manivannan Sadhasivam
@ 2024-12-27 16:08 ` Mohamed Khalfella
2024-12-30 7:26 ` Manivannan Sadhasivam
2025-01-15 11:25 ` Krzysztof Wilczyński
0 siblings, 2 replies; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-27 16:08 UTC (permalink / raw)
To: manivannan.sadhasivam
Cc: Frank.Li, bhelgaas, cassel, dlemoal, jiangwang, khalfella, kishon,
kw, kwilczynski, linux-kernel, linux-pci
If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is
freed.
Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index ef6677f34116..d90c8be7371e 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
fail_back_rx:
dma_release_channel(epf_test->dma_chan_rx);
- epf_test->dma_chan_tx = NULL;
+ epf_test->dma_chan_rx = NULL;
fail_back_tx:
dma_cap_zero(mask);
--
2.45.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
2024-12-27 16:08 ` [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Mohamed Khalfella
@ 2024-12-30 7:26 ` Manivannan Sadhasivam
2024-12-30 18:36 ` Mohamed Khalfella
2025-01-15 11:25 ` Krzysztof Wilczyński
1 sibling, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-30 7:26 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: Frank.Li, bhelgaas, cassel, dlemoal, jiangwang, kishon, kw,
kwilczynski, linux-kernel, linux-pci
On Fri, Dec 27, 2024 at 08:08:41AM -0800, Mohamed Khalfella wrote:
> If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is
> freed.
>
> Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
> Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Btw, you are sending next version as a reply to the previous one. But you should
send it separately.
- Mani
> Reviewed-by: Niklas Cassel <cassel@kernel.org>
> ---
> drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index ef6677f34116..d90c8be7371e 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -251,7 +251,7 @@ static int pci_epf_test_init_dma_chan(struct pci_epf_test *epf_test)
>
> fail_back_rx:
> dma_release_channel(epf_test->dma_chan_rx);
> - epf_test->dma_chan_tx = NULL;
> + epf_test->dma_chan_rx = NULL;
>
> fail_back_tx:
> dma_cap_zero(mask);
> --
> 2.45.2
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
2024-12-30 7:26 ` Manivannan Sadhasivam
@ 2024-12-30 18:36 ` Mohamed Khalfella
0 siblings, 0 replies; 12+ messages in thread
From: Mohamed Khalfella @ 2024-12-30 18:36 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: Frank.Li, bhelgaas, cassel, dlemoal, jiangwang, kishon, kw,
kwilczynski, linux-kernel, linux-pci
On 2024-12-30 12:56:45 +0530, Manivannan Sadhasivam wrote:
> On Fri, Dec 27, 2024 at 08:08:41AM -0800, Mohamed Khalfella wrote:
> > If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is
> > freed.
> >
> > Fixes: 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")
> > Signed-off-by: Mohamed Khalfella <khalfella@gmail.com>
>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>
> Btw, you are sending next version as a reply to the previous one. But you should
> send it separately.
>
Noted. Next time will try to do that.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
2024-12-27 16:08 ` [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Mohamed Khalfella
2024-12-30 7:26 ` Manivannan Sadhasivam
@ 2025-01-15 11:25 ` Krzysztof Wilczyński
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Wilczyński @ 2025-01-15 11:25 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: manivannan.sadhasivam, Frank.Li, bhelgaas, cassel, dlemoal,
jiangwang, kishon, linux-kernel, linux-pci
Hello,
> If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is
> freed.
Applied to endpoint for v6.14, thank you!
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-01-15 11:25 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-21 3:00 [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Mohamed Khalfella
2024-12-21 8:24 ` Niklas Cassel
2024-12-21 17:34 ` [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after " Mohamed Khalfella
2024-12-26 16:31 ` Manivannan Sadhasivam
2024-12-26 17:51 ` Mohamed Khalfella
2024-12-27 13:59 ` Manivannan Sadhasivam
2024-12-27 16:08 ` [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx Mohamed Khalfella
2024-12-30 7:26 ` Manivannan Sadhasivam
2024-12-30 18:36 ` Mohamed Khalfella
2025-01-15 11:25 ` Krzysztof Wilczyński
2024-12-21 19:18 ` [PATCH] PCI: endpoint: Set RX DMA channel to NULL aftre freeing it Markus Elfring
2024-12-21 20:00 ` Mohamed Khalfella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).