From: Joe Perches <joe@perches.com>
To: Yuval Mintz <yuvalmin@broadcom.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eilon Greenstein <eilong@broadcom.com>,
Yaniv Rosner <yaniv.rosner@broadcom.com>
Subject: RE: [PATCH net-next 2/6] bnx2x: link cleanup
Date: Wed, 20 Jun 2012 15:41:52 -0700 [thread overview]
Message-ID: <1340232112.29885.38.camel@joe2Laptop> (raw)
In-Reply-To: <979A8436335E3744ADCD3A9F2A2B68A5029F62@SJEXCHMB10.corp.ad.broadcom.com>
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'
next prev parent reply other threads:[~2012-06-20 22:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 8:49 [PATCH net-next 0/6] bnx2x: link patch series Yuval Mintz
2012-06-20 8:49 ` [PATCH net-next 1/6] bnx2x: sfp+ Tx fault detection added Yuval Mintz
2012-06-20 8:49 ` [PATCH net-next 2/6] bnx2x: link cleanup Yuval Mintz
2012-06-20 14:53 ` Joe Perches
2012-06-20 17:50 ` Yuval Mintz
2012-06-20 22:41 ` Joe Perches [this message]
2012-06-20 8:49 ` [PATCH net-next 3/6] bnx2x: treat 0 speed as link down (copper) Yuval Mintz
2012-06-20 8:49 ` [PATCH net-next 4/6] bnx2x: revised link register access Yuval Mintz
2012-06-20 8:49 ` [PATCH net-next 5/6] bnx2x: 1G sfp+ module handling Yuval Mintz
2012-06-20 8:49 ` [PATCH net-next 6/6] bnx2x: link module eeprom Yuval Mintz
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=1340232112.29885.38.camel@joe2Laptop \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=yaniv.rosner@broadcom.com \
--cc=yuvalmin@broadcom.com \
/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).