From: Changcheng Deng Date: Tue, 15 Feb 2022 02:33:55 +0000 (+0000) Subject: mt76: mt7915: use min_t() to make code cleaner X-Git-Tag: v6.1-rc5~1746^2~110^2~33^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77787358bed9131767118d3bd9f6a38405c2bfde;p=platform%2Fkernel%2Flinux-starfive.git mt76: mt7915: use min_t() to make code cleaner Use min_t() in order to make code cleaner. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c index 997ba9987dd9..6605e24c4593 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c @@ -227,12 +227,8 @@ mt7915_tm_set_ipg_params(struct mt7915_phy *phy, u32 ipg, u8 mode) ipg -= aifsn * slot_time; - if (ipg > TM_DEFAULT_SIFS) { - if (ipg < TM_MAX_SIFS) - sifs = ipg; - else - sifs = TM_MAX_SIFS; - } + if (ipg > TM_DEFAULT_SIFS) + sifs = min_t(u32, ipg, TM_MAX_SIFS); } done: txv_time = mt76_get_field(dev, MT_TMAC_ATCR(phy->band_idx),