Re: [PATCH] gpu: drm: amdgpu: Replace mdelay with msleep in cik_pcie_gen3_enable()

2018-07-24 Thread Alex Deucher
On Mon, Jul 23, 2018 at 10:29 AM, Jia-Ju Bai wrote: > cik_pcie_gen3_enable() is only called by cik_common_hw_init(), which is > never called in atomic context. > cik_pcie_gen3_enable() calls mdelay() to busily wait, which is not > necessary. > mdelay() can be replaced with msleep(). > > This is

[PATCH] gpu: drm: amdgpu: Replace mdelay with msleep in cik_pcie_gen3_enable()

2018-07-24 Thread Jia-Ju Bai
cik_pcie_gen3_enable() is only called by cik_common_hw_init(), which is never called in atomic context. cik_pcie_gen3_enable() calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself.