lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 11 Apr 2019 04:51:25 -0700
From:   Joe Perches <joe@...ches.com>
To:     Nicholas Mc Guire <der.herr@...r.at>,
        Stephen Boyd <sboyd@...nel.org>
Cc:     Nicholas Mc Guire <hofrat@...ntech.at>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        linux-arm-kernel@...ts.infradead.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] clk: ux500: add range to usleep_range

On Thu, 2019-04-11 at 04:56 +0200, Nicholas Mc Guire wrote:
> On Wed, Apr 10, 2019 at 03:53:51PM -0700, Stephen Boyd wrote:
> > Quoting Nicholas Mc Guire (2019-04-06 20:13:24)
> > > Providing a range for usleep_range() allows the hrtimer subsystem to
> > > coalesce timers - the delay is runtime configurable so a factor 2
> > > is taken to provide the range.
> > > 
> > > Signed-off-by: Nicholas Mc Guire <hofrat@...ntech.at>
> > > ---
> > 
> > I think this driver is in maintenance mode. I'll wait for Ulf to ack or
> > review this change before applying.
> > 
> > > diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c
> > > index 7c0403b..a1fa3fb 100644
> > > --- a/drivers/clk/ux500/clk-sysctrl.c
> > > +++ b/drivers/clk/ux500/clk-sysctrl.c
> > > @@ -42,7 +42,7 @@ static int clk_sysctrl_prepare(struct clk_hw *hw)
> > >                                 clk->reg_bits[0]);
> > >  
> > >         if (!ret && clk->enable_delay_us)
> > > -               usleep_range(clk->enable_delay_us, clk->enable_delay_us);
> > > +               usleep_range(clk->enable_delay_us, clk->enable_delay_us*2);
> > 
> > Please add space around that multiply.
> > 
> I can do that but it does not seem common and also checkpatch
> did not complain about this - now a simple grep -re "\*10" on the
> kernel shows that it seems more common not to use spaces around *
> that to use them.

Not really

$ git grep -P '\*\s*10' | grep -oh -P '\*\s*10' | \
  sort | uniq -c | sort -rn | head 
  11800 * 10
   1705 *10
    179 *  10
     74 *   10
     67 *	10
     20 *     10
     20 *      10
     14 *    10
     14 *		10
     12 *         10

> Greping specifically for cases using usleep_range()
> (not that many) it seems more or less evenly devided between space
> and no space - so the concern is overlooking that factor 2 ?
> 
> thx!
> hofrat 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ