From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Pierre Ossman <pierre@ossman.eu>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] mmc: wbsd: Replace mdelay with usleep_range in wbsd_init
Date: Thu, 12 Apr 2018 09:34:15 +0800 [thread overview]
Message-ID: <13f0f859-0331-c770-80ba-bc332b32582f@gmail.com> (raw)
In-Reply-To: <CAPDyKFq4hL6TRaovv9O1NLXBmd7QJQcuVGmc5kSO3Na-2gcT1g@mail.gmail.com>
On 2018/4/11 23:04, Ulf Hansson wrote:
> On 11 April 2018 at 04:46, Jia-Ju Bai <baijiaju1990@gmail.com> wrote:
>> wbsd_init() is never called in atomic context.
>>
>> The call chains ending up at wbsd_init() are:
>> [1] wbsd_init() <- wbsd_probe()
>> [2] wbsd_init() <- wbsd_pnp_probe()
>>
>> wbsd_probe() is set as ".probe" in struct platform_driver.
>> wbsd_pnp_probe() is set as ".probe" in struct pnp_driver.
>> These functions are not called in atomic context.
>>
>> Despite never getting called from atomic context, wbsd_init()
>> calls mdelay() to busily wait.
>> This is not necessary and can be replaced with usleep_range() to
>> avoid busy waiting.
>>
>> This is found by a static analysis tool named DCNS written by myself.
>> And I also manually check it.
>>
>> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> The patch is good, however I think you should squash all three in this
> series into one. For obvious reasons.
Hello, Ulf.
Thanks for your reply and advice :)
I will follow it in my future patches.
Best wishes,
Jia-Ju Bai
prev parent reply other threads:[~2018-04-12 1:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 2:46 [PATCH 1/3] mmc: wbsd: Replace mdelay with usleep_range in wbsd_init Jia-Ju Bai
2018-04-11 15:04 ` Ulf Hansson
2018-04-12 1:34 ` Jia-Ju Bai [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=13f0f859-0331-c770-80ba-bc332b32582f@gmail.com \
--to=baijiaju1990@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=pierre@ossman.eu \
--cc=ulf.hansson@linaro.org \
/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).