diff options
author | 2018-03-18 22:49:57 +0800 | |
---|---|---|
committer | 2018-10-01 12:15:21 +0200 | |
commit | be826ada52f1fcabed5b5217c94609ebf5967211 (patch) | |
tree | df45b2847e07a1ad49e5cce85802bf504eafe3de /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | pcmcia: Use module_pcmcia_driver for scsi drivers (diff) | |
download | linux-rng-be826ada52f1fcabed5b5217c94609ebf5967211.tar.xz linux-rng-be826ada52f1fcabed5b5217c94609ebf5967211.zip |
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>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions