The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] mac80211: minstrel_ht: Replace nested min() with single   min3()
@ 2025-03-15  3:12 feng.wei8
  2025-03-16 14:00 ` Johannes Berg
  2025-03-17  8:30 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 6+ messages in thread
From: feng.wei8 @ 2025-03-15  3:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: johannes, linux-wireless


[-- Attachment #1.1.1: Type: text/plain, Size: 949 bytes --]

From: FengWei <feng.wei8@zte.com.cn>

Use min3() macro instead of nesting min() to simplify the return
statement.

Signed-off-by: FengWei <feng.wei8@zte.com.cn>
---
 net/mac80211/rc80211_minstrel_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 08f3f530f984..31a3b6e4c58d 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1010,7 +1010,7 @@ minstrel_ht_refill_sample_rates(struct minstrel_ht_sta *mi)
 	u32 prob_dur = minstrel_get_duration(mi->max_prob_rate);
 	u32 tp_dur = minstrel_get_duration(mi->max_tp_rate[0]);
 	u32 tp2_dur = minstrel_get_duration(mi->max_tp_rate[1]);
-	u32 fast_rate_dur = min(tp_dur, tp2_dur, prob_dur);
+	u32 fast_rate_dur = min3(tp_dur, tp2_dur, prob_dur);
 	u32 slow_rate_dur = max(max(tp_dur, tp2_dur), prob_dur);
 	u16 *rates;
 	int i, j;
-- 
2.25.1

[-- Attachment #1.1.2: Type: text/html , Size: 1789 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-17  8:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-15  3:12 [PATCH] mac80211: minstrel_ht: Replace nested min() with single min3() feng.wei8
2025-03-16 14:00 ` Johannes Berg
2025-03-17  4:55   ` feng.wei8
2025-03-17  8:27     ` Krzysztof Kozlowski
2025-03-17  8:30 ` Krzysztof Kozlowski
2025-03-17  8:31   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox