[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1340232112.29885.38.camel@joe2Laptop>
Date: Wed, 20 Jun 2012 15:41:52 -0700
From: Joe Perches <joe@...ches.com>
To: Yuval Mintz <yuvalmin@...adcom.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eilon Greenstein <eilong@...adcom.com>,
Yaniv Rosner <yaniv.rosner@...adcom.com>
Subject: RE: [PATCH net-next 2/6] bnx2x: link cleanup
On Wed, 2012-06-20 at 17:50 +0000, Yuval Mintz wrote:
> > > 3. Change msleep(1) --> usleep_range(1000, 1000)
> >
> > I believe replacing msleep(small) with
> > usleep_range(small * 1000, small * 1000) is
> > not generally a good idea.
> >
> > Please give usleep_range an actual range to
> > work with and not a repeated single value.
> >
> > Please think a little more about what a
> > good upper range for the maximum time to
> > sleep should be.
> >
> > usleep_range(small * 1000, small * 2000)
> > or something similar maybe.
> >
>
> Sounds good. I'll change it and re-send the patch series.
Hi Yuval.
Here's a little script from awhile ago that
does it by doubling the small value as the
high value range bound.
http://kerneltrap.org/mailarchive/linux-netdev/2010/12/2/6290711
(replace [path] as appropriate)
$ grep -nPrl --include=*.[ch] "msleep\s*\(\s*1?\d\s*\)" [path] \
xargs perl -p -i -e 's/msleep\s*\(\s*(1?\d)\s*\)/"usleep_range\(${1}000, " . scalar($1) * 2 . "000\)"/ge'
--
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