summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zydas
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-11-01 22:15:32 +0100
committerKalle Valo <kvalo@codeaurora.org>2020-11-07 16:52:21 +0100
commit494e46d08d355294689a5811b54ae4ad01cdb95b (patch)
tree2390f313a31c53c2811d1f20b51819b6b65f2353 /drivers/net/wireless/zydas
parentairo: Always use JOB_STATS and JOB_EVENT (diff)
downloadlinux-494e46d08d355294689a5811b54ae4ad01cdb95b.tar.xz
linux-494e46d08d355294689a5811b54ae4ad01cdb95b.zip
airo: Replace in_atomic() usage.
issuecommand() is using in_atomic() to decide if it is safe to invoke schedule() while waiting for the command to be accepted. Usage of in_atomic() for this is only half correct as it can not detect all condition where it is not allowed to schedule(). Also Linus clearly requested that code which changes behaviour depending on context should either be seperated or the context be conveyed in an argument passed by the caller, which usually knows the context. Add an may_sleep argument to issuecommand() indicating when it is save to sleep and change schedule() to cond_resched() because it's pointless to invoke schedule() if there is no request to reschedule. Pass the may_sleep condition through the various call chains leading to issuecommand(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201101211536.2966644-5-bigeasy@linutronix.de
Diffstat (limited to 'drivers/net/wireless/zydas')
0 files changed, 0 insertions, 0 deletions