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@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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;