Skip to contentSkip to conversation

dmaengine: ppc4xx: remove unused variable `rval'

PATCH Applied Jason Wang 2 participants 2 messages Nov 14, 2021 – Nov 25, 2021 dmaengine

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 dmaengine: ppc4xx: remove unused variable `rval'

The variable used for returning status in ppc440spe_adma_dma2rxor_prep_src' function is never changed and this function just need to return 0. Thus, the rval' can be removed and return 0 from `ppc440spe_adma_dma2rxor_prep_src'.

---
 drivers/dma/ppc4xx/adma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/ppc4xx/adma.c +1 -2
index e2b5129c5f84..5e46e347e28b 100644
@@ -3240,7 +3240,6 @@ static int ppc440spe_adma_dma2rxor_prep_src(
 		struct ppc440spe_rxor *cursor, int index,
 		int src_cnt, u32 addr)
 {
-	int rval = 0;
 	u32 sign;
 	struct ppc440spe_adma_desc_slot *desc = hdesc;
 	int i;
@@ -3348,7 +3347,7 @@ static int ppc440spe_adma_dma2rxor_prep_src(
 		break;
 	}
 
-	return rval;
+	return 0;
 }
 
 /**
Signature · 1 line
2.33.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Jason Wang

The variable used for returning status in ppc440spe_adma_dma2rxor_prep_src' function is never changed and this function just need to return 0. Thus, the rval' can be removed and return 0 from `ppc440spe_adma_dma2rxor_prep_src'.

Applied, thanks

Signature · 1 line
~Vinod