Message ID | 20250315111254625RMIKeUh51j1Xk9CWuu2LT@zte.com.cn |
---|---|
State | New |
Headers | show |
Series | mac80211: minstrel_ht: Replace nested min() with single min3() | expand |
Please do not send utter garbage patches. It wastes everyone's time. If you don't know what you're doing, just stop. There's very very little value in such patches anyway, so don't send them. First think if it actually does something useful, and if in doubt, don't. johannes
On 15/03/2025 04:12, feng.wei8@zte.com.cn wrote: > 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); This is automation-generated junk code. How does it "simplify the statement"? Can ZTE slow down this flood of automation or research experiment on kernel community? Best regards, Krzysztof
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;