svn commit: r350532 - head/sys/netinet6
Bruce Evans
brde at optusnet.com.au
Fri Aug 2 10:47:52 UTC 2019
On Fri, 2 Aug 2019, Bjoern A. Zeeb wrote:
> Log:
> frag6.c: sort includes
>
> Sort includes and remove duplicate kernel.h as well as the unneeded
> systm.h.
sys/systm.h is always needed, since it defines macros and functions which
might be needed in other headers. frag6.c even uses KASSERT() directly.
> Modified: head/sys/netinet6/frag6.c
> ==============================================================================
> --- head/sys/netinet6/frag6.c Fri Aug 2 07:41:36 2019 (r350531)
> +++ head/sys/netinet6/frag6.c Fri Aug 2 10:06:54 2019 (r350532)
> @@ -37,18 +37,16 @@ __FBSDID("$FreeBSD$");
> #include "opt_rss.h"
>
> #include <sys/param.h>
> -#include <sys/systm.h>
This was correct. sys/systm.h must also be included in this order.
Now the KASSERT() used in frag6.c is apparently obtained via pollution
in some other header.
> -#include <sys/hash.h>
> -#include <sys/malloc.h>
> -#include <sys/mbuf.h>
> #include <sys/domain.h>
> +#include <sys/errno.h>
sys/errno is standard pollution in sys/param.h (if _KERNEL). It is a style
bug to not depend on this.
> #include <sys/eventhandler.h>
> +#include <sys/hash.h>
> #include <sys/kernel.h>
> +#include <sys/malloc.h>
sys/malloc.h is polluted by including sys/systm.h.
> +#include <sys/mbuf.h>
sys/mbuf.h is polluted by including sys/systm.h.
> #include <sys/protosw.h>
> #include <sys/socket.h>
> -#include <sys/errno.h>
> #include <sys/time.h>
sys/time.h is standard pollution in sys/param.h (if _KERNEL). It is a style
bug to not depend on this.
> -#include <sys/kernel.h>
> #include <sys/syslog.h>
>
> #include <machine/atomic.h>
machine/atomic.h is standard non-pollution on sys/systm.h. It is a style
bug to include it directly.
Bruce
More information about the svn-src-head
mailing list