[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220215023355.1750720-1-deng.changcheng@zte.com.cn>
Date: Tue, 15 Feb 2022 02:33:55 +0000
From: cgel.zte@...il.com
To: nbd@....name
Cc: lorenzo.bianconi83@...il.com, ryder.lee@...iatek.com,
shayne.chen@...iatek.com, sean.wang@...iatek.com, kvalo@...nel.org,
davem@...emloft.net, kuba@...nel.org, mcoquelin.stm32@...il.com,
alexandre.torgue@...s.st.com, matthias.bgg@...il.com,
arnd@...db.de, Bo.Jiao@...iatek.com, deng.changcheng@....com.cn,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH] mt76: mt7915: use min_t() to make code cleaner
From: Changcheng Deng <deng.changcheng@....com.cn>
Use min_t() in order to make code cleaner.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@....com.cn>
---
drivers/net/wireless/mediatek/mt76/mt7915/testmode.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
index 83da21d15ddd..61f255166a7f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/testmode.c
@@ -228,12 +228,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(ext_phy),
--
2.25.1
Powered by blists - more mailing lists