* [PATCH] mmc: mxs-mmc: Fix warning due to incorrect type
@ 2013-01-08 0:42 Fabio Estevam
2013-01-08 6:57 ` Marek Vasut
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2013-01-08 0:42 UTC (permalink / raw)
To: cjb; +Cc: marex, linux-mmc, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/mmc/host/mxs-mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 206fe49..eb33cb1 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Fix warning due to incorrect type
2013-01-08 0:42 [PATCH] mmc: mxs-mmc: Fix warning due to incorrect type Fabio Estevam
@ 2013-01-08 6:57 ` Marek Vasut
2013-01-28 20:48 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2013-01-08 6:57 UTC (permalink / raw)
To: Fabio Estevam; +Cc: cjb, linux-mmc, Fabio Estevam
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Nice
Acked-by: Marek Vasut <marex@denx.de>
> ---
> drivers/mmc/host/mxs-mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 206fe49..eb33cb1 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: mxs-mmc: Fix warning due to incorrect type
2013-01-08 6:57 ` Marek Vasut
@ 2013-01-28 20:48 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2013-01-28 20:48 UTC (permalink / raw)
To: Marek Vasut; +Cc: Fabio Estevam, linux-mmc, Fabio Estevam
Hi,
On Tue, Jan 08 2013, Marek Vasut wrote:
>> 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.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Nice
>
> Acked-by: Marek Vasut <marex@denx.de>
Thanks, pushed to mmc-next for 3.9.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-28 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 0:42 [PATCH] mmc: mxs-mmc: Fix warning due to incorrect type Fabio Estevam
2013-01-08 6:57 ` Marek Vasut
2013-01-28 20:48 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).