diff mbox series

mac80211: minstrel_ht: Simplify minimum determination in minstrel_ht_refill_sample_rates()

Message ID b8a3ccdf-a059-4550-8a9a-bfe66ce28cb2@web.de (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show
Series mac80211: minstrel_ht: Simplify minimum determination in minstrel_ht_refill_sample_rates() | expand

Checks

Context Check Description
jmberg/fixes_present success Fixes tag not required for -next series
jmberg/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
jmberg/tree_selection success Guessed tree name to be wireless-next
jmberg/ynl success Generated files up to date; no warnings/errors; no diff in generated;
jmberg/build_32bit success Errors and warnings before: 0 this patch: 0
jmberg/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
jmberg/build_clang success Errors and warnings before: 0 this patch: 0
jmberg/build_clang_rust success No Rust files in patch. Skipping build
jmberg/build_tools success No tools touched, skip
jmberg/check_selftest success No net selftest shell script
jmberg/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
jmberg/deprecated_api success None detected
jmberg/header_inline success No static functions without inline keyword in header files
jmberg/kdoc success Errors and warnings before: 0 this patch: 0
jmberg/source_inline success Was 0 now: 0
jmberg/verify_fixes success No Fixes tag
jmberg/verify_signedoff success Signed-off-by tag matches author and committer

Commit Message

Markus Elfring Feb. 28, 2025, 10:23 a.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 28 Feb 2025 11:13:58 +0100

Replace nested min() calls by single min3() call in this
function implementation.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 net/mac80211/rc80211_minstrel_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.48.1
diff mbox series

Patch

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 706cbc99f718..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(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;