[PATCH 18/34] staging: mt7621-mmc: Remove variable num form msdc_dma_setup
Christian Lütke-Stetzkamp
christian at lkamp.de
Mon Jun 11 19:46:23 UTC 2018
The variable num in msdc_dma_setup is only used for a BUG_ON
statement, so it can be removed by inlining the condition.
Signed-off-by: Christian Lütke-Stetzkamp <christian at lkamp.de>
---
drivers/staging/mt7621-mmc/sd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index e1077068604d..68dfbf38b0ea 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -1037,15 +1037,14 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma,
struct scatterlist *sg;
struct gpd *gpd;
struct bd *bd;
- u32 j, num;
+ u32 j;
BUG_ON(sglen > MAX_BD_NUM); /* not support currently */
N_MSG(DMA, "DMA sglen<%d> xfersz<%d>", sglen, host->xfer_size);
/* calculate the required number of gpd */
- num = (sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD;
- BUG_ON(num != 1);
+ BUG_ON(((sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD) != 1);
gpd = dma->gpd;
bd = dma->bd;
--
2.16.1
More information about the devel
mailing list