From: Marek Vasut <marex@denx.de>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] iio: mxs-lradc: remove useless check
Date: Sat, 18 Jan 2014 21:33:15 +0100 [thread overview]
Message-ID: <201401182133.15839.marex@denx.de> (raw)
In-Reply-To: <1390071918-10622-1-git-send-email-alexandre.belloni@free-electrons.com>
On Saturday, January 18, 2014 at 08:05:18 PM, Alexandre Belloni wrote:
> Checking the channel number is useless since mxs_lradc_read_raw() is called
> from a controlled environment and the driver is responsible for filing the
> struct iio_chan_spec.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 4 ----
> 1 file changed, 4 deletions(-)
Changelog's missing ;-)
Acked-by: Marek Vasut <marex@denx.de>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c
> b/drivers/staging/iio/adc/mxs-lradc.c index 7fc66a6a6e36..d304156ca2f7
> 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -897,10 +897,6 @@ static int mxs_lradc_read_raw(struct iio_dev *iio_dev,
> {
> struct mxs_lradc *lradc = iio_priv(iio_dev);
>
> - /* Check for invalid channel */
> - if (chan->channel > LRADC_MAX_TOTAL_CHANS)
> - return -EINVAL;
> -
> switch (m) {
> case IIO_CHAN_INFO_RAW:
> if (chan->type == IIO_TEMP)
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-01-18 20:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-18 19:05 [PATCH v2] iio: mxs-lradc: remove useless check Alexandre Belloni
2014-01-18 20:33 ` Marek Vasut [this message]
2014-02-03 19:09 ` 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=201401182133.15839.marex@denx.de \
--to=marex@denx.de \
--cc=alexandre.belloni@free-electrons.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.