linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Matt Ranostay <matt.ranostay@konsulko.com>,
	Nicholas Mc Guire <hofrat@osadl.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Matt Ranostay <mranostay@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: health: max30100: use msleep() for long uncritical delays
Date: Sat, 21 Jan 2017 14:20:44 +0000	[thread overview]
Message-ID: <683569ef-1f8c-02ad-337a-da7da8d6317e@kernel.org> (raw)
In-Reply-To: <CAJCx=gnjskR22TW1g6w243CKqCA8TmJ4wWeRORG1e7q9=MxKzw@mail.gmail.com>

On 17/01/17 02:00, Matt Ranostay wrote:
> On Mon, Jan 16, 2017 at 7:35 AM, Nicholas Mc Guire <hofrat@osadl.org> wrote:
>> ulseep_range() uses hrtimers and provides no advantage over msleep()
>> for larger delays. Fix up the 35ms delays here to use msleep() and
>> reduce the load on the hrtimer subsystem.
> 
> Ok makes sense.  Also long as it guaranteed to be at least 35 milliseconds.
> 
> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Fair enough. Applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with it.

Thanks,

Jonathan
> 
>>
>> Fixes: commit 4d33615df58b ("iio: light: add MAX30100 oximeter driver support")
>> Link: http://lkml.org/lkml/2017/1/11/377
>> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
>> ---
>> Problem located with coccinelle script
>>
>> Patch was compile tested with: x86_64_defconfig + CONFIG_IIO=m +
>> CONFIG_MAX30100=m
>>
>> Patch is aginast 4.10-rc3 (localversion-next is next-20170116)
>>
>>  drivers/iio/health/max30100.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/health/max30100.c b/drivers/iio/health/max30100.c
>> index 90ab8a2d..9648c69 100644
>> --- a/drivers/iio/health/max30100.c
>> +++ b/drivers/iio/health/max30100.c
>> @@ -378,7 +378,7 @@ static int max30100_get_temp(struct max30100_data *data, int *val)
>>         if (ret)
>>                 return ret;
>>
>> -       usleep_range(35000, 50000);
>> +       msleep(35);
>>
>>         return max30100_read_temp(data, val);
>>  }
>> --
>> 2.1.4
>>
>> --
>> 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-01-21 14:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 15:35 [PATCH] iio: health: max30100: use msleep() for long uncritical delays Nicholas Mc Guire
2017-01-17  2:00 ` Matt Ranostay
2017-01-21 14:20   ` 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=683569ef-1f8c-02ad-337a-da7da8d6317e@kernel.org \
    --to=jic23@kernel.org \
    --cc=hofrat@osadl.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.ranostay@konsulko.com \
    --cc=mranostay@gmail.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).