linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Varsha Rao <rvarsha016@gmail.com>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Barry Song <21cnbao@gmail.com>
Cc: outreachy-kernel@googlegroups.com, linux-iio@vger.kernel.org
Subject: Re: [PATCH v2] staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call.
Date: Sat, 18 Mar 2017 14:19:56 +0000	[thread overview]
Message-ID: <284ededc-23fc-fc97-be70-63c4b3ad2d55@kernel.org> (raw)
In-Reply-To: <08d175a1-af67-40f9-7301-7f7158347e3c@metafoo.de>

On 17/03/17 09:03, Lars-Peter Clausen wrote:
> On 03/15/2017 11:11 PM, Jonathan Cameron wrote:
>> On 14/03/17 16:23, Varsha Rao wrote:
>>> Remove mutex_lock() and mutex_unlock() function calls, as the
>>> adis16240_spi_read_signed() function can be run parallel and safely
>>> multiple times. Also remove the mutex.h header file and comment, which
>>> are no longer required.
>>>
>>> As indio_dev is declared and initialized in adis16240_spi_read_signed(),
>>> again declaration to same type and initialization to same value is not
>>> required, remove it from adis16240_read_12bit_signed().
>>>
>>> Simplify the return logic, by merging assignment and return into a single
>>> line.
>>>
>>> Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
>> It's a bit obscure, but isn't there the potential to get the check_status
>> call spitting out text for the wrong read, or potentially miss a status
>> value entirely?
>>
>> (kind of more for Lars really, but feel free to comment Varsha!)
>>
>> The various faults look like this wouldn't be an issue, but I'm not
>> totally sure about the SPI failure and whether a following good read
>> at exactly the wrong time might result in the error not being reported...
> 
> I don't think it matters. The error reporting is asynchronous anyway and the
> bits are read-to-clear. So even if two access see the error flag set in the
> data only one of them will be able to read the bits in the diag_stat
> register (unless the error is persistent, in which case the error flag in
> the data would also be persistent).
Fair enough.

Applied to the togreg branch of iio.git - will push out as testing later
for the autobuilders to play with it.


Thanks,

Jonathan
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


      reply	other threads:[~2017-03-18 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 16:23 [PATCH v2] staging: iio: adis16240: Remove mutex_lock() and mutex_unlock() function call Varsha Rao
2017-03-15 22:11 ` Jonathan Cameron
2017-03-17  1:57   ` Varsha Rao
2017-03-17  9:03   ` Lars-Peter Clausen
2017-03-18 14:19     ` Jonathan Cameron [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=284ededc-23fc-fc97-be70-63c4b3ad2d55@kernel.org \
    --to=jic23@kernel.org \
    --cc=21cnbao@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=gregkh@linuxfoundation.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 \
    --cc=rvarsha016@gmail.com \
    /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).