From nobody Wed Nov 26 14:45:51 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dGj6n1Y79z6J98G for ; Wed, 26 Nov 2025 14:46:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dGj6m5wnFz3K9s for ; Wed, 26 Nov 2025 14:46:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-3436cbb723fso5583126a91.2 for ; Wed, 26 Nov 2025 06:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1764168363; x=1764773163; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AzRjO5BGfW/rintfbXZndjaE6J3+AtVLsujNjNjzRrQ=; b=xz0XqWZ4jUjulawk/inksGVAMnWR4rGOBieCr4kKH13nqluu2V3uDCiBnZq2UGG0WT 284Ii67OmQ20bMOwYOHufAKBIKvNH/GZxDjNxadNqb7g9ITsN5xRIWyw6lkGTw/6ireP guaS6zYQoHLfc034lg8RAOOFNSHwXkhCUrsTw04BmvW1/Gx0XvrBeWAbHiPP/BxrtGvi aPPRIEHCQsymvT+DSHk777qyW1/M+IpNKwn+n7l95iVs2tHSbgliEhVUmtSVv/jsVSMS 2rxC33xzME2V+EOuOVW7DBVAX0sC1+K7efWu0L0TgFpmJZFJfrqCyiBcSX2rQucsJcdQ PRPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764168363; x=1764773163; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AzRjO5BGfW/rintfbXZndjaE6J3+AtVLsujNjNjzRrQ=; b=jmwC34F1HS0LKSt2oou+kB/5YUXQbY19T6aCGl8+o7fH++MbjZ8dt4e9FGw7j34OX7 xlzR8FdcA1oInk/e1tRZFgF58p+4Pw05tKNeg6+Q3yIhb+D/QWCwM5D80aSpTyVmARoJ 7PIQaIdsk0nmedZ37ItD6p8NuKtOXGHnR4owAWeaHP9hz9pUNYxbmPBWY0XcIpfPdW18 hxOdMpQRNPrkRnmDMUv1tBjuvfUXhz9zay9TpAy2m7naAnOq/HwmrAaDXJ1mTJt7ITEU 6xfeSL4w/Gjaf4D2eABfHqAcCP0CZ2OBSRwy0sua/7KgplP+YTmWitM56ZkwmPqYYWPS 4zzA== X-Forwarded-Encrypted: i=1; AJvYcCVTmWbgUX+FyhXFf+BT8i4dFLI0+SkaB91ltJ/6+IpOMTnagpGYUqkDbqYK5o60fnxPeIlVM9Cy2ZLRAzvrRL6cZbBk@freebsd.org X-Gm-Message-State: AOJu0YzS5rbIg9ud7/kur0qUeRQPQpuALVW6HfS92viNagH7k4/5ilVK wAGcB0ubRBhwgBDiDB9TzOdZj5r+tFL0pO35mcSmdEqb43VnOmqzkw+zbHkjYvYPWxTTeJcVcwO I+WUuxvhMPydotViYz3HbOi2jw7aeEB+Duyct8VYRVw== X-Gm-Gg: ASbGncvvxhonUE3cL8zd34TQnhHz68NwXAlMjxMtpWQ+nv5eegvbIRsT0HbsyYPkMzV eBBxX50KN6JozLBWIcJOG8tf2XNuuISsgGYNk6pSychUxgQO4byE6Nr3DRjWRoROzRC6Aw7Xxww 1colYudryUlJzn/P8541tI7O4MsmJax6ab8bA76ANM3DF+w5C3keAGXk8uvNZeoap/FR5Jx67Cz QNeMufn6mCuE0cCfHQacXmPcvsOLHck4IBLv7IUG0mp+klMBwbjoPbdaXNAoJ5GM9rE4G0= X-Google-Smtp-Source: AGHT+IEPDQvdK8EfzHqiyE3JbR7QlYguD+eGXYLCIlONnXv2gLAFeIO+aTdwG+tCzpFzmuX8xS/tmnqJS++4OK3bJ6k= X-Received: by 2002:a17:90b:4c45:b0:341:3ea2:b625 with SMTP id 98e67ed59e1d1-3475ebfa712mr7225881a91.12.1764168362562; Wed, 26 Nov 2025 06:46:02 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 26 Nov 2025 07:45:51 -0700 X-Gm-Features: AWmQ_bktBBg2t8ywe5zhjzVVWMqwQ3d8gEH854O7zn6LSD0gSVyS4dvNWFTURn8 Message-ID: Subject: Re: git: 301b8a806f79 - main - nvme: Minor style(9) fixes To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000932612064480742d" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dGj6m5wnFz3K9s --000000000000932612064480742d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Nov 26, 2025 at 5:06=E2=80=AFAM Konstantin Belousov wrote: > On Tue, Nov 25, 2025 at 04:17:51PM +0000, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D301b8a806f79292ee3324ca938a4d93= 8df1911e8 > > > > commit 301b8a806f79292ee3324ca938a4d938df1911e8 > > Author: Warner Losh > > AuthorDate: 2025-11-25 16:10:23 +0000 > > Commit: Warner Losh > > CommitDate: 2025-11-25 16:12:51 +0000 > > > > nvme: Minor style(9) fixes > > > > needs to be first after . And we don't > need > > both sys/param.h and sys/types.h. > > We do not both sys/param.h and sys/systm.h as well, since sys/systm.h > includes sys/param.h. > Style(9): Kernel include files (sys/*.h) come first. If either or is needed, include it before other include files. ( includes ; do not include both.) Next, include , if needed. The remaining kernel headers should be sorted alphabetically. Should I update it to say just include systm.h over param.h over types.h? Or is there some other rule to follow that we should document? A quick survey suggests this is often the case, but a large minority of the time both or even all three are included. However, in this case, I needed to keep it separate because nvme.h is included by userland and I thought systm.h was kernel only (without checking)... but systm.h does seem to have all the proper guards to make that ok... Warner --000000000000932612064480742d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Nov 26,= 2025 at 5:06=E2=80=AFAM Konstantin Belousov <kostikbel@gmail.com> wrote:
On Tue, Nov 25, 2025 at 04:17:51PM +0000, = Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D301b8a806f79292ee3324ca938a4d938df1911e8<= /a>
>
> commit 301b8a806f79292ee3324ca938a4d938df1911e8
> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> AuthorDate: 2025-11-25 16:10:23 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-11-25 16:12:51 +0000
>
>=C2=A0 =C2=A0 =C2=A0nvme: Minor style(9) fixes
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0<sys/systm.h> needs to be first after <sys= /param.h>. And we don't need
>=C2=A0 =C2=A0 =C2=A0both sys/param.h and sys/types.h.

We do not both sys/param.h and sys/systm.h as well, since sys/systm.h
includes sys/param.h.

=C2=A0 =C2=A0 =C2=A0Kernel includ= e files (sys/*.h) come first.=C2=A0 If either <sys/types.h> or
=C2= =A0 =C2=A0 =C2=A0<sys/param.h> is needed, include it before other inc= lude files.
=C2=A0 =C2=A0 =C2=A0(<sys/param.h> includes <sys/ty= pes.h>; do not include both.) Next,
=C2=A0 =C2=A0 =C2=A0include <s= ys/systm.h>, if needed.=C2=A0 The remaining kernel headers should be
= =C2=A0 =C2=A0 =C2=A0sorted alphabetically.

Should I = update it to say just include systm.h over param.h over types.h? Or is ther= e some other rule to follow that we should document? A quick survey suggest= s this is often the case, but a large minority of the time both or even all= three are included.

However, in this case, I need= ed to keep it separate because nvme.h is included by userland and I thought= systm.h was kernel only (without checking)... but systm.h does seem to hav= e all the proper guards to make that ok...

Warner= =C2=A0
--000000000000932612064480742d--