On Mittwoch, 19. Oktober 2016 01:22:39 CEST Linus Lüssing wrote:
On Tue, Oct 18, 2016 at 11:28:23PM +0200, Sven Eckelmann wrote:
Doesn't seem to scale. Especially when we think about batadv_netlink_ops which should also be const. It is currently not const because of the Linux <= 3.13 workaround.
Hm, okay, batadv_netlink_ops is a little more tricky/larger, yes. What about a memcpy'ing approach with BUILD_BUG_ON()'s as safe-guards like this:
Yes, this would also be an idea. But I would personally just use the coccinelle approach because it needs less extra hacks. Or do you have any problems with coccinelle? My personal preferences are (at the moment):
1. code which doesn't need compat code 2. code which can supported with clean (not too hacky) compat-include 3. code which can be supported with coccinelle 4. code which can be supported with compat.h hacks 5. code which can be supported with small patches
The replace.sh was just a quick way to make sure we can ship 2016.4 without to many extra modifications.
Btw. this is right now only something for later. It is more important to get your other changes in master. And also to get the patchwork queue smaller - so reviews are more than welcome.
Kind regards, Sven