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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to