Skip to content
Commit 72cbd314 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: Replace mdelay with usleep_range in dm_TXPowerTrackingCallback_TSSI



dm_TXPowerTrackingCallback_TSSI() is never called in atomic context.

dm_TXPowerTrackingCallback_TSSI() is only called by
dm_txpower_trackingcallback(), which is set a parameter of
INIT_DELAYED_WORK() in rtl8192_init_priv_task().

Despite never getting called from atomic context,
dm_TXPowerTrackingCallback_TSSI() 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: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c93c63a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment