[PATCH v5 3/3] dmaengine: dw-axi-dmac: Remove not useful void return function statements

Khairul Anuar Romli posted 3 patches 1 week, 5 days ago
There is a newer version of this series
[PATCH v5 3/3] dmaengine: dw-axi-dmac: Remove not useful void return function statements
Posted by Khairul Anuar Romli 1 week, 5 days ago
Remove an unnecessary `return` statement from a
dw_axi_dma_set_hw_channel(). This resolves a coding style issue introduced
by 'commit 32286e279385 ("dmaengine: dw-axi-dmac: Remove free slot check
algorithm in dw_axi_dma_set_hw_channel")' and ensures proper function
semantic. This unnecessary return were detected with the help of the
checkpatch.pl analysis tool with --strict --file option.

Signed-off-by: Khairul Anuar Romli <karom.9560@gmail.com>
---
 drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index e59725376f8e..c124ac6c8df6 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -593,8 +593,6 @@ static void dw_axi_dma_set_hw_channel(struct axi_dma_chan *chan, bool set)
 			(chan->id * DMA_APB_HS_SEL_BIT_SIZE));
 	reg_value |= (val << (chan->id * DMA_APB_HS_SEL_BIT_SIZE));
 	lo_hi_writeq(reg_value, chip->apb_regs + DMAC_APB_HW_HS_SEL_0);
-
-	return;
 }
 
 /*
-- 
2.43.0
Re: [PATCH v5 3/3] dmaengine: dw-axi-dmac: Remove not useful void return function statements
Posted by Markus Elfring 1 week, 5 days ago
> Remove an unnecessary `return` statement from a

Would such information be also appropriate for a summary phrase?


…
> semantic. This unnecessary return were detected with the help of the
> checkpatch.pl analysis tool with --strict --file option.

How do you think about to mention a “warning” better in the change description?

Would it be nicer to put such a hint into another paragraph?

Regards,
Markus