Re: [PATCH] base: power: domain: Replace mdelay with msleep

From: Jia-Ju Bai
Date: Fri Jan 26 2018 - 05:28:57 EST




On 2018/1/26 18:26, Pavel Machek wrote:
On Fri 2018-01-26 16:38:19, Jia-Ju Bai wrote:
After checking all possible call chains to genpd_dev_pm_detach() and
genpd_dev_pm_attach() here,
my tool finds that these functions are never called in atomic context,
namely never in an interrupt handler or holding a spinlock.
Thus mdelay can be replaced with msleep to avoid busy wait.

This is found by a static analysis tool named DCNS written by
myself.

Well, cond_resched() just after msleep certainly looks like that.

Did the patch receive any testing?


Thanks for reply :)

I only perform compilation testing but did not run it in real execution.


Thanks,
Jia-Ju Bai