On Wed, May 11, 2016 at 12:38:31PM +0200, Sven Eckelmann wrote:
On Wednesday 11 May 2016 18:29:16 Antonio Quartulli wrote:
If main.h is included, the forward declaration for struct batadv_priv is not required.
Cc: Sven Eckelmann sven@narfation.org Signed-off-by: Antonio Quartulli a@unstable.cc
Sven, is there any special region for not having the include in this file ? It seems to be compiling just fine.
Cheers,
We have some files which don't include main.h:
- net/batman-adv/bat_algo.h
- net/batman-adv/bat_v_ogm.h
- net/batman-adv/netlink.h
There is a special exception which should not include it to avoid cycles in the includes:
- net/batman-adv/packet.h
The reason for the other three is just... there is no reason I can provide other than it was not necessary for these files :). But if you want that to have "main.h" included everywhere then please do it really everywhere:
Maybe I could include it only when really needed, i.e. * net/batman-adv/bat_algo.h * net/batman-adv/bat_v_ogm.h
(netlink.h does not seem to be requiring it)
Cheers,