On Tuesday 27 February 2007 02:18, Pavel Roskin wrote: > On Mon, 2007-02-26 at 23:59 +0100, Johannes Berg wrote: > > This fixes some sparse warnings in d80211. > > > > Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> > > > > --- > > A few warnings remain: > > > > net/d80211/ieee80211.c:820:37: warning: potentially expensive pointer subtraction > > That's subtraction of pointers to types with sizes that are not power of > two. This could lead to expensive division operations. In may cases, > this warning indicates that using array indices instead of pointers > would be more effective (and probably safer). Uh, well. I think it's this line, no? control->rts_rateidx = (int)(rate - tx->local->curr_rates); The problem there is, we have a pointer into an array and we need to get the index number into that array. Any better way to get an index by a pointer and a basepointer? -- Greetings Michael. - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html