summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-03-11 15:17:32 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-14 18:33:08 +0100
commit6413489354f1c67f56f64625d648b9adf4463795 (patch)
tree680bfae565a0291c34bc17502683ecd21cc784f8 /drivers/staging
parent65c873c37ec36bbecd1b7da753061d214f23474b (diff)
staging: rtl8723bs: Use min() instead of doing it manually
Fix following coccicheck warning: drivers/staging/rtl8723bs/core/rtw_xmit.c:452:25-26: WARNING opportunity for min() Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1646983052-16390-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_xmit.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index f466bfd248fb..a22512633d1b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -449,10 +449,7 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib *
pattrib->raid = psta->raid;
- if (mlmeext->cur_bwmode < psta->bw_mode)
- pattrib->bwmode = mlmeext->cur_bwmode;
- else
- pattrib->bwmode = psta->bw_mode;
+ pattrib->bwmode = min(mlmeext->cur_bwmode, psta->bw_mode);
pattrib->sgi = query_ra_short_GI(psta);