Commit d812c6a9 authored by Christian Lütke-Stetzkamp's avatar Christian Lütke-Stetzkamp Committed by Greg Kroah-Hartman

staging: mt7621-mmc: Remove variable num form msdc_dma_setup

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: default avatarChristian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe219842
...@@ -1037,15 +1037,14 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma, ...@@ -1037,15 +1037,14 @@ static void msdc_dma_setup(struct msdc_host *host, struct msdc_dma *dma,
struct scatterlist *sg; struct scatterlist *sg;
struct gpd *gpd; struct gpd *gpd;
struct bd *bd; struct bd *bd;
u32 j, num; u32 j;
BUG_ON(sglen > MAX_BD_NUM); /* not support currently */ BUG_ON(sglen > MAX_BD_NUM); /* not support currently */
N_MSG(DMA, "DMA sglen<%d> xfersz<%d>", sglen, host->xfer_size); N_MSG(DMA, "DMA sglen<%d> xfersz<%d>", sglen, host->xfer_size);
/* calculate the required number of gpd */ /* calculate the required number of gpd */
num = (sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD; BUG_ON(((sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD) != 1);
BUG_ON(num != 1);
gpd = dma->gpd; gpd = dma->gpd;
bd = dma->bd; bd = dma->bd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment