On Sat, Nov 12, 2016 at 10:07:22PM +0100, Johannes Berg wrote: > On Sat, 2016-11-12 at 20:18 +0000, Arend van Spriel wrote: > > nl80211 now uses section qualifier __ro_after_init. However, this > > is not available in kernels before v4.6. Neither is the section > > itself hence adding an empty define in backports. > > > +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,6,0)) > > +#define __ro_after_init > > +#endif > > Due to how __ro_after_init works, it *has* to be a macro originally, so > you could just ifndef on itself: > > #ifndef __ro_after_init > #define __ro_after_init > #endif > > and be slightly more compatible in case somebody ever backports it. Agreed. > Don't think it really matters much, but why not. Distributions that do wish to backport the __ro_after_init mechanism will have this defined, so indeed what you suggest seems appropriate. When backporting things like these please try to Cc the original authors as they can easily provide feedback about issues they can think of if you backport things one way or another. I've Cc'd Kees but I think this backport is straight forward -- for older kernels we just cannot backport this for modules running old kernels where we cannot modify the kernels, making this a no-op for old kernels is the best we can then. Luis -- To unsubscribe from this list: send the line "unsubscribe backports" in