Remove unused length argument from get_burst_len() and add burst size as an argument to allow usage of this function in other places as source and destination burst sizes are handled separately. Signed-off-by: Joy Chakraborty <joychakr@xxxxxxxxxx> --- drivers/dma/pl330.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 746da0bbea92..e5e610c91f18 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2660,8 +2660,7 @@ __pl330_prep_dma_memcpy(struct dma_pl330_chan *pch, dma_addr_t dst, return desc; } -/* Call after fixing burst size */ -static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len) +static inline int get_burst_len(struct dma_pl330_desc *desc, unsigned int brst_size) { struct dma_pl330_chan *pch = desc->pchan; struct pl330_dmac *pl330 = pch->dmac; @@ -2669,7 +2668,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len) burst_len = pl330->pcfg.data_bus_width / 8; burst_len *= pl330->pcfg.data_buf_dep / pl330->pcfg.num_chan; - burst_len >>= desc->rqcfg.src_brst_size; + burst_len >>= brst_size; /* src/dst_burst_len can't be more than 16 */ if (burst_len > PL330_MAX_BURST) @@ -2805,7 +2804,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst, burst /= 2; desc->rqcfg.src_brst_size = __ffs(burst); - desc->rqcfg.src_brst_len = get_burst_len(desc, len); + desc->rqcfg.src_brst_len = get_burst_len(desc, desc->rqcfg.src_brst_size); /* * If burst size is smaller than bus width then make sure we only * transfer one at a time to avoid a burst stradling an MFIFO entry. -- 2.40.1.606.ga4b1b128d6-goog