[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7431484.AHk4tMfvN6@amdc3058>
Date: Tue, 24 Apr 2018 17:42:51 +0200
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Jia-Ju Bai <baijiaju1990@...il.com>
Cc: adaplas@...il.com, linux-fbdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: savage: Replace mdelay with usleep_range
in savage_init_hw
On Tuesday, April 10, 2018 09:05:59 AM Jia-Ju Bai wrote:
> savage_init_hw() is never called in atomic context.
>
> The call chains ending up at savage_init_hw() are:
> [1] savage_init_hw() <- savagefb_probe()
> [2] savage_init_hw() <- savagefb_resume()
>
> savagefb_probe() is only set as ".probe" in struct pci_driver.
> savagefb_resume) is only set as ".resume" in struct pci_driver.
> These functions are not called in atomic context.
>
> Despite never getting called from atomic context, savage_init_hw()
> 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@...il.com>
Patch queued for 4.18, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Powered by blists - more mailing lists