Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2022 15:19:39 -0600
From:      Mike Karels <mike@karels.net>
To:        Konstantin Belousov <kib@FreeBSD.org>
Cc:        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:  <E2293F4C-416E-45AE-9220-743ECF9B9B76@karels.net>
In-Reply-To: <202212292056.2BTKuOIu047460@gitrepo.freebsd.org>
References:  <202212292056.2BTKuOIu047460@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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=3D68912701700ca3230f3e2d4b=
7858a038f884a327
>
> 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=E2=80=
=99t
object to direct inclusion of param.h even if one of the 14 other headers=

in sys/ that include param.h are also included.

		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?E2293F4C-416E-45AE-9220-743ECF9B9B76>