From: Larry Finger <Larry.Finger@lwfinger.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: John W Linville <linville@tuxdriver.com>,
chaoming_li@realsil.com.cn, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: rtl8192de/phy.c: fix udelay() usage
Date: Thu, 30 Jun 2011 17:03:16 -0500 [thread overview]
Message-ID: <4E0CF2A4.7070207@lwfinger.net> (raw)
In-Reply-To: <20110630143358.cf4d4e2f.akpm@linux-foundation.org>
On 06/30/2011 04:33 PM, Andrew Morton wrote:
> Also, there are eleventy billion instances of
>
> for (j = 0; j< N; j++)
> udelay(MAX_STALL_TIME);
>
> which seem rather unnecessary.
>
> static inline void rtl8192c_udelay(unsigned n)
> {
> if (n< 1000)
> udelay(n);
> else
> mdelay(n / 1000);
> }
>
> or something.
As MAX_STALL_TIME is 50, I have done the math for (N * 50) / 1000 and changed
the loop to the equivalent mdelay call.
Larry
prev parent reply other threads:[~2011-06-30 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 21:28 [PATCH] rtlwifi: rtl8192de/phy.c: fix udelay() usage Larry Finger
2011-06-30 21:33 ` Andrew Morton
2011-06-30 22:03 ` Larry Finger [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=4E0CF2A4.7070207@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=akpm@linux-foundation.org \
--cc=chaoming_li@realsil.com.cn \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).