Re: [PATCH] ata: pata_pdc2027x: Replace mdelay with msleep
From: Tejun Heo
Date: Thu Jan 25 2018 - 10:31:06 EST
On Thu, Jan 25, 2018 at 06:45:05PM +0800, Jia-Ju Bai wrote:
> After checking all possible call chains to pdc_adjust_pll and
> pdc_detect_pll_input_clock,
> my tool finds that these functions are never called in atomic context,
> namely never in an interrupt handler or holding a spinlock.
> And their caller functions pdc2027x_init_one and pdc2027x_reinit_one
> calls pci_enable_device which can sleep, and no spinlock is held when
> calling pdc_adjust_pll and pdc_detect_pll_input_clock,
> so it proves that pdc_adjust_pll and pdc_detect_pll_input_clock
> can call functions which can sleep.
> Thus mdelay can be replaced with msleep to avoid busy wait.
>
> Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
Applied to libata/for-4.16.
Thanks.
--
tejun