mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 21:50:44 -05:00
wifi: rtw89: 8852bt: Simplify unnecessary if-else conditions in _dpk_onoff()
Some simple if-else logic can be simplified using the ! operator to improve code readability. Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250818064219.448066-1-liaoyuanhong@vivo.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
ec0b44736b
commit
33319e8fd7
@@ -1803,10 +1803,7 @@ static void _dpk_onoff(struct rtw89_dev *rtwdev, enum rtw89_rf_path path, bool o
|
||||
|
||||
val = dpk->is_dpk_enable && !off && dpk->bp[path][kidx].path_ok;
|
||||
|
||||
if (off)
|
||||
off_reverse = false;
|
||||
else
|
||||
off_reverse = true;
|
||||
off_reverse = !off;
|
||||
|
||||
val = dpk->is_dpk_enable & off_reverse & dpk->bp[path][kidx].path_ok;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user