Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1557735

Re: [PATCH] Input: silead: use msleep() for long delays

From Nicholas Mc Guire <der.herr@hofr.at>
Newsgroups linux.kernel
Subject Re: [PATCH] Input: silead: use msleep() for long delays
Date 2017-01-12 20:00 +0100
Message-ID <sYSLo-7sp-29@gated-at.bofh.it> (permalink)
References <sYQqd-69X-25@gated-at.bofh.it> <sYRFD-6Pt-15@gated-at.bofh.it> <sYSin-7i7-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jan 12, 2017 at 10:10:44AM -0800, Dmitry Torokhov wrote:
> On Thu, Jan 12, 2017 at 9:46 AM, Hans de Goede <hdegoede@redhat.com> wrote:
> > Hi,
> >
> > On 01/12/2017 05:21 PM, Nicholas Mc Guire wrote:
> >>
> >> the delays here are in the 10 to 20ms range so msleep() will do - no
> >> need to burden the highres timer subsystem.
> >>
> >> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> >> ---
> >>
> >> Problem found by coccinelle script
> >>
> >> While msleep(10) has a worst case uncertainty of 10ms (on HZ=100 systems)
> >> this seems ok here as the delays are not called frequently (init and
> >> reset functions)
> >
> >
> > By the same logic, this is not much of a burden on the high-res timer
> > subsys though.
> >
> >> and the uncertainty of 10ms fits the permitted range of
> >> the original usleep_ranges().
> >
> >
> > Either way this patch is fine with me.
> 
> I'd rather not because next will come a checkpatch warrior and I will
> have to convince them why msleep is OK here. And another one, and
> another one... :(
>
there is no checkpatch warning here - checkpatch only throws warnings
of range < 20ms if hardcoded but this is in a #define so its fine with
respect to checkpatch.

But if there are concerns with this - thats fine - its most likely not
critical - the goal is to have a consistent usage of highres timers - 
including limiting there use to the cases where its really needed.

thx!
hofrat

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] Input: silead: use msleep() for long delays Nicholas Mc Guire <hofrat@osadl.org> - 2017-01-12 17:30 +0100
  Re: [PATCH] Input: silead: use msleep() for long delays Hans de Goede <hdegoede@redhat.com> - 2017-01-12 18:50 +0100
    Re: [PATCH] Input: silead: use msleep() for long delays Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-12 19:30 +0100
      Re: [PATCH] Input: silead: use msleep() for long delays Nicholas Mc Guire <der.herr@hofr.at> - 2017-01-12 20:00 +0100

csiph-web