mmc: mxs-mmc: Fix warning due to incorrect type
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/1 mmc: mxs-mmc: Fix warning due to incorrect type
From: Fabio Estevam <[email protected]>
Fixes the following warning when building with W=1 option:
drivers/mmc/host/mxs-mmc.c: In function 'mxs_mmc_adtc':drivers/mmc/host/mxs-mmc.c:401:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
The warning happens because 'i' is used in 'for_each_sg(sgl, sg, sg_len, i)' and should be made unsigned.
--- drivers/mmc/host/mxs-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/mxs-mmc.c +1 -1
@@ -354,7 +354,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)struct dma_async_tx_descriptor *desc;struct scatterlist *sgl = data->sg, *sg;unsigned int sg_len = data->sg_len; -int i; +unsigned int i;unsigned short dma_data_dir, timeout;enum dma_transfer_direction slave_dirn;
Signature · 1 line
1.7.9.5
Dear Fabio Estevam,
Quoted 4 lines
From: Fabio Estevam <[email protected]>
Fixes the following warning when building with W=1 option:
Quoted 8 lines
drivers/mmc/host/mxs-mmc.c: In function 'mxs_mmc_adtc':drivers/mmc/host/mxs-mmc.c:401:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]The warning happens because 'i' is used in '
for_each_sg(sgl, sg, sg_len, i)' and should be made unsigned.Signed-off-by Fabio Estevam <[email protected]>
Nice
Quoted 9 lines
--- drivers/mmc/host/mxs-mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mmc/host/mxs-mmc.c +0
-0
drivers/mmc/host/mxs-mmc.c static void mxs_mmc_adtc(struct mxs_mmc_host *host) · line 360
Quoted 8 lines
drivers/mmc/host/mxs-mmc.c +1
-1@@ -354,7 +354,7 @@ static void mxs_mmc_adtc(struct mxs_mmc_host *host)struct dma_async_tx_descriptor *desc;struct scatterlist *sgl = data->sg, *sg;unsigned int sg_len = data->sg_len; -int i; +unsigned int i;unsigned short dma_data_dir, timeout;enum dma_transfer_direction slave_dirn;
Best regards,
Marek Vasut
Hi,
Quoted 6 lines · Marek Vasut
Quoted 6 lines
Fixes the following warning when building with W=1 option:
drivers/mmc/host/mxs-mmc.c: In function 'mxs_mmc_adtc':drivers/mmc/host/mxs-mmc.c:401:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Quoted 8 lines
Quoted 4 lines
The warning happens because 'i' is used in '
for_each_sg(sgl, sg, sg_len, i)' and should be made unsigned.Signed-off-by Fabio Estevam <[email protected]>Nice
Acked-by Marek Vasut <[email protected]>
Thanks, pushed to mmc-next for 3.9.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child