* [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL"
@ 2022-03-17 10:22 Haowen Bai
2022-04-11 14:04 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: Haowen Bai @ 2022-03-17 10:22 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine, linux-kernel, Haowen Bai
Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
drivers/dma/amba-pl08x.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index a24882b..c70552a 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1538,9 +1538,7 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
struct dma_chan *chan, unsigned long flags)
{
- struct dma_async_tx_descriptor *retval = NULL;
-
- return retval;
+ return NULL;
}
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL"
2022-03-17 10:22 [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL" Haowen Bai
@ 2022-04-11 14:04 ` Vinod Koul
2022-04-12 1:14 ` [PATCH V2] dmaengine: pl08x: drop the useless function "NULL" Haowen Bai
2022-04-12 1:16 ` [PATCH V3] dmaengine: pl08x: drop the useless function Haowen Bai
0 siblings, 2 replies; 5+ messages in thread
From: Vinod Koul @ 2022-04-11 14:04 UTC (permalink / raw)
To: Haowen Bai; +Cc: dmaengine, linux-kernel
On 17-03-22, 18:22, Haowen Bai wrote:
> Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
>
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
> drivers/dma/amba-pl08x.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index a24882b..c70552a 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1538,9 +1538,7 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
> static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
> struct dma_chan *chan, unsigned long flags)
> {
> - struct dma_async_tx_descriptor *retval = NULL;
> -
> - return retval;
> + return NULL;
better way, drop the function?
> }
>
> /*
> --
> 2.7.4
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2] dmaengine: pl08x: drop the useless function "NULL"
2022-04-11 14:04 ` Vinod Koul
@ 2022-04-12 1:14 ` Haowen Bai
2022-04-12 1:16 ` [PATCH V3] dmaengine: pl08x: drop the useless function Haowen Bai
1 sibling, 0 replies; 5+ messages in thread
From: Haowen Bai @ 2022-04-12 1:14 UTC (permalink / raw)
To: Vinod Koul; +Cc: Haowen Bai, dmaengine, linux-kernel
Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
better way, drop the function.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: drop the useless function.
drivers/dma/amba-pl08x.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index a24882ba3764..a4a794e62ac2 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1535,14 +1535,6 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
vchan_free_chan_resources(to_virt_chan(chan));
}
-static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
- struct dma_chan *chan, unsigned long flags)
-{
- struct dma_async_tx_descriptor *retval = NULL;
-
- return retval;
-}
-
/*
* Code accessing dma_async_is_complete() in a tight loop may give problems.
* If slaves are relying on interrupts to signal completion this function
@@ -2760,7 +2752,6 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
pl08x->memcpy.dev = &adev->dev;
pl08x->memcpy.device_free_chan_resources = pl08x_free_chan_resources;
pl08x->memcpy.device_prep_dma_memcpy = pl08x_prep_dma_memcpy;
- pl08x->memcpy.device_prep_dma_interrupt = pl08x_prep_dma_interrupt;
pl08x->memcpy.device_tx_status = pl08x_dma_tx_status;
pl08x->memcpy.device_issue_pending = pl08x_issue_pending;
pl08x->memcpy.device_config = pl08x_config;
@@ -2787,8 +2778,6 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
pl08x->slave.dev = &adev->dev;
pl08x->slave.device_free_chan_resources =
pl08x_free_chan_resources;
- pl08x->slave.device_prep_dma_interrupt =
- pl08x_prep_dma_interrupt;
pl08x->slave.device_tx_status = pl08x_dma_tx_status;
pl08x->slave.device_issue_pending = pl08x_issue_pending;
pl08x->slave.device_prep_slave_sg = pl08x_prep_slave_sg;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V3] dmaengine: pl08x: drop the useless function
2022-04-11 14:04 ` Vinod Koul
2022-04-12 1:14 ` [PATCH V2] dmaengine: pl08x: drop the useless function "NULL" Haowen Bai
@ 2022-04-12 1:16 ` Haowen Bai
2022-04-20 11:49 ` Vinod Koul
1 sibling, 1 reply; 5+ messages in thread
From: Haowen Bai @ 2022-04-12 1:16 UTC (permalink / raw)
To: Vinod Koul; +Cc: Haowen Bai, dmaengine, linux-kernel
Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
better way, drop the function.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: drop the useless function.
V2->V3: change title
drivers/dma/amba-pl08x.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index a24882ba3764..a4a794e62ac2 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1535,14 +1535,6 @@ static void pl08x_free_chan_resources(struct dma_chan *chan)
vchan_free_chan_resources(to_virt_chan(chan));
}
-static struct dma_async_tx_descriptor *pl08x_prep_dma_interrupt(
- struct dma_chan *chan, unsigned long flags)
-{
- struct dma_async_tx_descriptor *retval = NULL;
-
- return retval;
-}
-
/*
* Code accessing dma_async_is_complete() in a tight loop may give problems.
* If slaves are relying on interrupts to signal completion this function
@@ -2760,7 +2752,6 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
pl08x->memcpy.dev = &adev->dev;
pl08x->memcpy.device_free_chan_resources = pl08x_free_chan_resources;
pl08x->memcpy.device_prep_dma_memcpy = pl08x_prep_dma_memcpy;
- pl08x->memcpy.device_prep_dma_interrupt = pl08x_prep_dma_interrupt;
pl08x->memcpy.device_tx_status = pl08x_dma_tx_status;
pl08x->memcpy.device_issue_pending = pl08x_issue_pending;
pl08x->memcpy.device_config = pl08x_config;
@@ -2787,8 +2778,6 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
pl08x->slave.dev = &adev->dev;
pl08x->slave.device_free_chan_resources =
pl08x_free_chan_resources;
- pl08x->slave.device_prep_dma_interrupt =
- pl08x_prep_dma_interrupt;
pl08x->slave.device_tx_status = pl08x_dma_tx_status;
pl08x->slave.device_issue_pending = pl08x_issue_pending;
pl08x->slave.device_prep_slave_sg = pl08x_prep_slave_sg;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V3] dmaengine: pl08x: drop the useless function
2022-04-12 1:16 ` [PATCH V3] dmaengine: pl08x: drop the useless function Haowen Bai
@ 2022-04-20 11:49 ` Vinod Koul
0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2022-04-20 11:49 UTC (permalink / raw)
To: Haowen Bai; +Cc: dmaengine, linux-kernel
On 12-04-22, 09:16, Haowen Bai wrote:
> Unneeded variable: "retval". Return "NULL" , so we have to make code clear.
> better way, drop the function.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-20 11:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 10:22 [PATCH] dmaengine: pl08x: remove unneeded variable: "retval". Return "NULL" Haowen Bai
2022-04-11 14:04 ` Vinod Koul
2022-04-12 1:14 ` [PATCH V2] dmaengine: pl08x: drop the useless function "NULL" Haowen Bai
2022-04-12 1:16 ` [PATCH V3] dmaengine: pl08x: drop the useless function Haowen Bai
2022-04-20 11:49 ` Vinod Koul
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).