On Thu, 2019-09-19 at 14:22 +0200, Toke Høiland-Jørgensen wrote: Given a ULL constant: > +/* constants for calculating reciprocals to avoid division in fast path */ > +#define IEEE80211_RECIPROCAL_DIVISOR 0x100000000ULL [...] > +void ieee80211_sta_set_last_tx_bitrate(struct ieee80211_sta *pubsta, > + u32 rate) > +{ > + struct sta_info *sta = container_of(pubsta, struct sta_info, sta); > + > + sta->last_tx_bitrate = rate; > + sta->last_tx_bitrate_reciprocal = ((u64)IEEE80211_RECIPROCAL_DIVISOR / rate); that cast seems unnecessary? johannes