PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
Subsystems (2)
PATCH 1/1 PCI: endpoint: Set RX DMA channel to NULL aftre freeing it
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.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/endpoint/functions/pci-epf-test.c +1 -1
@@ -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);
Signature · 1 line
2.45.2
Hello Mohamed,
in subject s/aftre/after/
Quoted 3 lines · Mohamed Khalfella
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 .."
Quoted 2 lines
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:
when sending out V2.
Quoted 21 lines
Signed-off-by Mohamed Khalfella <[email protected]>--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/endpoint/functions/pci-epf-test.c +1
-1@@ -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);Signature · 1 line
2.45.2
PATCH v2 1/1 PCI: endpoint: Set RX DMA channel to NULL after freeing it
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.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/endpoint/functions/pci-epf-test.c +1 -1
@@ -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);
Signature · 1 line
2.45.2
Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
Quoted 3 lines · Mohamed Khalfella
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
Quoted 23 lines
Fixes 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")Signed-off-by Mohamed Khalfella <[email protected]>Reviewed-by Niklas Cassel <[email protected]>--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/endpoint/functions/pci-epf-test.c +1
-1@@ -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);Signature · 1 line
2.45.2
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
Quoted 9 lines · Manivannan Sadhasivam
Quoted 3 lines · Mohamed Khalfella
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_rxpointer 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?
Re: [PATCH v2] PCI: endpoint: Set RX DMA channel to NULL after freeing it
Quoted 9 lines · Mohamed Khalfella
Quoted 8 lines · Manivannan Sadhasivam
Quoted 3 lines · Mohamed Khalfella
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_rxpointer and that's it.
Quoted 7 lines
Quoted 1 line
Reword it as such.
PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to
dma_chan_rxWhen allocating
dma_chan_txfails setdma_chan_rxto NULL after it is freed.
s/"When allocating dma_chan_tx fails"/"If dma_chan_tx allocation fails,"
- Mani
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH v3 1/1 PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
If dma_chan_tx allocation fails, set dma_chan_rx to NULL after it is freed.
--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/endpoint/functions/pci-epf-test.c +1 -1
@@ -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);
Signature · 1 line
2.45.2
Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
Quoted 5 lines · Mohamed Khalfella
If
dma_chan_txallocation fails, setdma_chan_rxto NULL after it is freed.Fixes 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")Signed-off-by Mohamed Khalfella <[email protected]>
Btw, you are sending next version as a reply to the previous one. But you should send it separately.
- Mani
Quoted 21 lines
Reviewed-by Niklas Cassel <[email protected]>--- drivers/pci/endpoint/functions/pci-epf-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/endpoint/functions/pci-epf-test.c +1
-1@@ -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);Signature · 1 line
2.45.2
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Re: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
Quoted 4 lines · Manivannan Sadhasivam
Quoted 3 lines · Mohamed Khalfella
If
dma_chan_txallocation fails, setdma_chan_rxto NULL after it is freed.
Quoted 8 lines
Quoted 2 lines
Fixes 8353813c88ef ("PCI: endpoint: Enable DMA tests for endpoints with DMA capabilities")Signed-off-by Mohamed Khalfella <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>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.
Krzysztof Wilczyński
AppliedRe: [PATCH v3] PCI: endpoint: pci-epf-test: Fix NULL ptr assignment to dma_chan_rx
In reply to Mohamed KhalfellaHello,
Quoted 2 lines
If
dma_chan_txallocation fails, setdma_chan_rxto NULL after it is freed.
Applied to endpoint for v6.14, thank you!
Krzysztof
Quoted 1 line
Fixed a small bug in pci-epf-test driver. …
Please avoid a typo in the summary phrase for the final commit.
Regards,
Markus
Quoted 3 lines · Markus Elfring
Quoted 1 line
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.