linux-stable/drivers/char/pcmcia
Jia-Ju Bai be826ada52 char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol
set_protocol() is never called in atomic context.

The call chains ending up at set_protocol() are:
[1] set_protocol() <- monitor_card()
[2] set_protocol() <- cmm_ioctl()
monitor_card() is only set in setup_timer(), and cmm_ioctl() is only
set as ".unlocked_ioctl" in file_operations structure "cm4000_fops".

Despite never getting called from atomic context, set_protocol() calls
mdelay(10), i.e. busy wait for 10ms.
That 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.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Acked-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2018-10-01 12:15:21 +02:00
..
cm4000_cs.c char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol 2018-10-01 12:15:21 +02:00
cm4040_cs.c pcmcia: remove KERN_INFO level from debug message 2018-10-01 12:15:16 +02:00
cm4040_cs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig char/pcmcia: add scr24x_cs chip card interface driver 2016-11-10 17:03:36 +01:00
Makefile char/pcmcia: add scr24x_cs chip card interface driver 2016-11-10 17:03:36 +01:00
scr24x_cs.c char/pcmcia: add some error checking in scr24x_read() 2016-11-29 20:43:12 +01:00
synclink_cs.c tty: replace ->proc_fops with ->proc_show 2018-05-16 07:24:30 +02:00