Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Jia-Ju Bai
On 2018/7/27 18:34, Andy Shevchenko wrote: On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai wrote: reset() and init_display() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep().

Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Andy Shevchenko
On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai wrote: > reset() and init_display() are never called in atomic context. > They call mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep(). > gpio_set_value(par->gpio.reset, 0); > udelay(20); >

[PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Jia-Ju Bai
reset() and init_display() are never called in atomic context. They call 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. Signed-off-by: Jia-Ju Bai ---