On Mon, 2007-02-19 at 07:33 +0100, Johannes Berg wrote: > On Sun, 2007-02-18 at 16:54 -0500, Pavel Roskin wrote: > > Oh, and by the way, wouldn't it be reasonable to have an inline function > > to calculate the pointer to the priv area instead of having an actual > > field for the pointer? > > Yeah, I guess that isn't too hard to do. But if you think about what the > current code will compile to that's also just an addition based on the > struct size that is known at compile time. Perhaps you misunderstood my idea. There is an field called priv in struct ieee80211_hw. That field will be written to, no matter how good the compiler is at optimization. And most drivers will access that field by reading from memory. Having an inline function brings following benefits: 1) Memory access is replaced with adding a constant (marginal speed-up) 2) Removing priv from struct ieee80211_hw (marginal memory saving) 3) priv cannot be written to (marginal safety improvement) I see that the list doesn't look impressive, but I want to correct possible misunderstanding anyway. -- Regards, Pavel Roskin - 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