From: Michael Trimarchi <michael@amarulasolutions.com>
To: David Miller <davem@davemloft.net>
Cc: peppe.cavallaro@st.com, festevam@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH V2] net: stmmac: use msleep instead of udelay for gpio reset
Date: Wed, 22 Apr 2015 02:55:03 +0200 [thread overview]
Message-ID: <20150422005503.GA11073@panicking> (raw)
In-Reply-To: <20150421.203134.3443090203330589.davem@davemloft.net>
Hi
On Tue, Apr 21, 2015 at 08:31:34PM -0400, David Miller wrote:
> From: Michael Trimarchi <michael@amarulasolutions.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@amarulasolutions.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
prev parent reply other threads:[~2015-04-22 0:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 11:16 [PATCH V2] net: stmmac: use msleep instead of udelay for gpio reset Michael Trimarchi
2015-04-21 21:35 ` David Miller
2015-04-21 23:13 ` Michael Trimarchi
2015-04-22 0:31 ` David Miller
2015-04-22 0:55 ` Michael Trimarchi [this message]
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=20150422005503.GA11073@panicking \
--to=michael@amarulasolutions.com \
--cc=davem@davemloft.net \
--cc=festevam@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.