From: Marek Vasut <marex@denx.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: jic23@cam.ac.uk, linux-iio@vger.kernel.org,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH] iio: mxs-lradc: indexes are unsigned
Date: Tue, 8 Jan 2013 07:57:56 +0100 [thread overview]
Message-ID: <201301080757.56301.marex@denx.de> (raw)
In-Reply-To: <1357607117-5868-1-git-send-email-festevam@gmail.com>
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Fix the following warning when building with W=1 option:
>
> drivers/staging/iio/adc/mxs-lradc.c: In function
> 'mxs_lradc_trigger_handler': drivers/staging/iio/adc/mxs-lradc.c:244:2:
> warning: comparison between signed and unsigned integer expressions
> [-Wsign-compare]
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Maybe use "unsigned int" instead? Either way:
Acked-by: Marek Vasut <marex@denx.de>
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
> b/drivers/staging/iio/adc/mxs-lradc.c index fb31b45..6cf3af8 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -239,7 +239,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq,
> void *p) struct mxs_lradc *lradc = iio_priv(iio);
> const uint32_t chan_value = LRADC_CH_ACCUMULATE |
> ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
> - int i, j = 0;
> + u32 i, j = 0;
>
> for_each_set_bit(i, iio->active_scan_mask, iio->masklength) {
> lradc->buffer[j] = readl(lradc->base + LRADC_CH(j));
Best regards,
Marek Vasut
next prev parent reply other threads:[~2013-01-08 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 1:05 [PATCH] iio: mxs-lradc: indexes are unsigned Fabio Estevam
2013-01-08 6:57 ` Marek Vasut [this message]
2013-01-09 20:07 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201301080757.56301.marex@denx.de \
--to=marex@denx.de \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).