lkml.org 
[lkml]   [2018]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] mmc: wbsd: Replace mdelay with usleep_range in wbsd_init
From
Date


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

\
 
 \ /
  Last update: 2018-04-12 03:35    [W:0.042 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site