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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150422005503.GA11073@panicking>
Date:	Wed, 22 Apr 2015 02:55:03 +0200
From:	Michael Trimarchi <michael@...rulasolutions.com>
To:	David Miller <davem@...emloft.net>
Cc:	peppe.cavallaro@...com, festevam@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH V2] net: stmmac: use msleep instead of udelay for gpio
 reset

Hi

On Tue, Apr 21, 2015 at 08:31:34PM -0400, David Miller wrote:
> From: Michael Trimarchi <michael@...rulasolutions.com>
> Date: Wed, 22 Apr 2015 01:13:47 +0200
> 
> > Hi
> > 
> > On Tue, Apr 21, 2015 at 05:35:40PM -0400, David Miller wrote:
> >> From: Michael Trimarchi <michael@...rulasolutions.com>
> >> Date: Tue, 21 Apr 2015 13:16:13 +0200
> >> 
> >> > -			udelay(data->delays[0]);
> >>  ...
> >> > +			msleep(max(1U, data->delays[0] / 1000));
> >> 
> >> That looks very ugly with that max() expression in there.
> >>
> > 
> > Is fine for you a DIV_ROUND_UP?
> 
> Not inside of these simple msleep() calls, no.
> 
> How about adjusting the values either in the datastructure or
> in local variables instead?  That wasn't so hard to come up
> with now, was it?

Ok, it's easy no problem at all, I will post later today but I prefer
local variables and use DIV_ROUND_UP

Michael

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ