From: Alison Schofield <amsfield22@gmail.com>
To: Gargi Sharma <gs051095@gmail.com>
Cc: outreachy-kernel@googlegroups.com, linux-iio@vger.kernel.org,
lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org
Subject: Re: [Outreachy kernel] [RESEND PATCH] staging: adis16203: Remove locking on raw reads of IIO_CHAN_INFO_CALIBBIAS
Date: Tue, 21 Mar 2017 09:15:47 -0700 [thread overview]
Message-ID: <20170321161547.GD1859@d830.WORKGROUP> (raw)
In-Reply-To: <1490112126-30265-1-git-send-email-gs051095@gmail.com>
On Tue, Mar 21, 2017 at 09:32:06PM +0530, Gargi Sharma wrote:
> adis16203_read_raw does not need lock for IIO_CHAN_INFO_CALIBBIAS
> since adis_read_reg_16 is already atomic and nothing else needs to be
> protected.
>
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Just sent yesterday too!
> ---
> drivers/staging/iio/accel/adis16203.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/adis16203.c b/drivers/staging/iio/accel/adis16203.c
> index 68189ad..14fe2d3 100644
> --- a/drivers/staging/iio/accel/adis16203.c
> +++ b/drivers/staging/iio/accel/adis16203.c
> @@ -203,17 +203,14 @@ static int adis16203_read_raw(struct iio_dev *indio_dev,
> return IIO_VAL_INT;
> case IIO_CHAN_INFO_CALIBBIAS:
> bits = 14;
> - mutex_lock(&indio_dev->mlock);
> addr = adis16203_addresses[chan->scan_index];
> ret = adis_read_reg_16(st, addr, &val16);
> if (ret) {
> - mutex_unlock(&indio_dev->mlock);
> return ret;
> }
> val16 &= (1 << bits) - 1;
> val16 = (s16)(val16 << (16 - bits)) >> (16 - bits);
> *val = val16;
> - mutex_unlock(&indio_dev->mlock);
> return IIO_VAL_INT;
> default:
> return -EINVAL;
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1490112126-30265-1-git-send-email-gs051095%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
prev parent reply other threads:[~2017-03-21 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 16:02 [RESEND PATCH] staging: adis16203: Remove locking on raw reads of IIO_CHAN_INFO_CALIBBIAS Gargi Sharma
2017-03-21 16:15 ` Alison Schofield [this message]
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=20170321161547.GD1859@d830.WORKGROUP \
--to=amsfield22@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=gregkh@linuxfoundation.org \
--cc=gs051095@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pmeerw@pmeerw.net \
/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).