Skip to content

Commit 6413489

Browse files
Lotte-Baigregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 65c873c commit 6413489

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/staging/rtl8723bs/core/rtw_xmit.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,7 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib *
449449

450450
pattrib->raid = psta->raid;
451451

452-
if (mlmeext->cur_bwmode < psta->bw_mode)
453-
pattrib->bwmode = mlmeext->cur_bwmode;
454-
else
455-
pattrib->bwmode = psta->bw_mode;
452+
pattrib->bwmode = min(mlmeext->cur_bwmode, psta->bw_mode);
456453

457454
pattrib->sgi = query_ra_short_GI(psta);
458455

0 commit comments

Comments
 (0)