Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 2022 00:12:51 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mike Karels <mike@karels.net>
Cc:        Konstantin Belousov <kib@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 68912701700c - main - ffs_suspend.c: clean up includes
Message-ID:  <Y64Q44MKG3eU7xvY@kib.kiev.ua>
In-Reply-To: <E2293F4C-416E-45AE-9220-743ECF9B9B76@karels.net>
References:  <202212292056.2BTKuOIu047460@gitrepo.freebsd.org> <E2293F4C-416E-45AE-9220-743ECF9B9B76@karels.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 29, 2022 at 03:19:39PM -0600, Mike Karels wrote:
> On 29 Dec 2022, at 14:56, Konstantin Belousov wrote:
> 
> > The branch main has been updated by kib:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=68912701700ca3230f3e2d4b7858a038f884a327
> >
> > commit 68912701700ca3230f3e2d4b7858a038f884a327
> > Author:     Konstantin Belousov <kib@FreeBSD.org>
> > AuthorDate: 2022-12-28 18:17:53 +0000
> > Commit:     Konstantin Belousov <kib@FreeBSD.org>
> > CommitDate: 2022-12-29 20:55:39 +0000
> >
> >     ffs_suspend.c: clean up includes
> >
> >     Order includes alphabetically.
> >     Remove unneeded sys/param.h, it is already included by sys/systm.h.
> 
> I am surprised by the last change; it seems contrary to the spirit (at
> least) of style(9).  In particular, style(9) says that param.h or types.h
> goes first (or after cdefs.h), followed by systm.h if needed.  I don’t
> object to direct inclusion of param.h even if one of the 14 other headers
> in sys/ that include param.h are also included.

This is what I was told (continuosly) by Bruce.
No need to include sys/param.h if sys/systm.h is used in kernel, at least.

> 
> 		Mike
> 
> >     Reviewed by:    mckusick
> >     Sponsored by:   The FreeBSD Foundation
> >     MFC after:      1 week
> >     Differential revision:  https://reviews.freebsd.org/D37896
> > ---
> >  sys/ufs/ffs/ffs_suspend.c | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> >
> > diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c
> > index d13097109758..e7c976b6e921 100644
> > --- a/sys/ufs/ffs/ffs_suspend.c
> > +++ b/sys/ufs/ffs/ffs_suspend.c
> > @@ -33,15 +33,14 @@
> >  #include <sys/cdefs.h>
> >  __FBSDID("$FreeBSD$");
> >
> > -#include <sys/param.h>
> >  #include <sys/systm.h>
> >  #include <sys/buf.h>
> > -#include <sys/ioccom.h>
> > -#include <sys/mount.h>
> > -#include <sys/vnode.h>
> >  #include <sys/conf.h>
> > +#include <sys/ioccom.h>
> >  #include <sys/jail.h>
> > +#include <sys/mount.h>
> >  #include <sys/sx.h>
> > +#include <sys/vnode.h>
> >
> >  #include <security/mac/mac_framework.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y64Q44MKG3eU7xvY>