Date: Mon, 1 Dec 2025 22:51:26 -0700 From: Warner Losh <imp@bsdimp.com> To: John Baldwin <jhb@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 301b8a806f79 - main - nvme: Minor style(9) fixes Message-ID: <CANCZdfrVzK_kY-mG6zonJL1XbzFVvsf_bxA44nYKFMKAJOuSgg@mail.gmail.com> In-Reply-To: <6365e335-fcc8-4590-af40-230815012f9d@FreeBSD.org> References: <6925d6af.3b42c.336a0065@gitrepo.freebsd.org> <6365e335-fcc8-4590-af40-230815012f9d@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Mon, Dec 1, 2025 at 7:53 AM John Baldwin <jhb@freebsd.org> wrote: > On 11/25/25 11:17, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8 > > > > commit 301b8a806f79292ee3324ca938a4d938df1911e8 > > Author: Warner Losh <imp@FreeBSD.org> > > AuthorDate: 2025-11-25 16:10:23 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > CommitDate: 2025-11-25 16:12:51 +0000 > > > > nvme: Minor style(9) fixes > > > > <sys/systm.h> needs to be first after <sys/param.h>. And we don't > need > > both sys/param.h and sys/types.h. > > > > Fixes: 032fbda024d78 > > Sponsored by: Netflix > > --- > > sys/dev/nvme/nvme.h | 11 ++++------- > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h > > index 3de65a4a481f..ddbc149802f4 100644 > > --- a/sys/dev/nvme/nvme.h > > +++ b/sys/dev/nvme/nvme.h > > @@ -29,15 +29,13 @@ > > #ifndef __NVME_H__ > > #define __NVME_H__ > > > > -#ifdef _KERNEL > > -#include <sys/types.h> > > -#endif > > - > > #include <sys/param.h> > > -#include <sys/endian.h> > > -#ifndef _KERNEL > > +#ifdef _KERNEL > > +#include <sys/systm.h> > > +#else > > #include <stdbool.h> > > #endif > > +#include <sys/endian.h> > > > > struct sbuf; > > > > @@ -1909,7 +1907,6 @@ void nvme_sc_sbuf(const struct nvme_completion > *cpl, struct sbuf *sbuf); > > void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, > int srclen); > > > > #ifdef _KERNEL > > -#include <sys/systm.h> > > #include <sys/disk.h> > > I should perhaps just move this to the top as well so all the #include's > are in one place. > Done [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Dec 1, 2025 at 7:53 AM John Baldwin <<a href="mailto:jhb@freebsd.org">jhb@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/25/25 11:17, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=301b8a806f79292ee3324ca938a4d938df1911e8</a><br> > <br> > commit 301b8a806f79292ee3324ca938a4d938df1911e8<br> > Author: Warner Losh <imp@FreeBSD.org><br> > AuthorDate: 2025-11-25 16:10:23 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2025-11-25 16:12:51 +0000<br> > <br> > nvme: Minor style(9) fixes<br> > <br> > <sys/systm.h> needs to be first after <sys/param.h>. And we don't need<br> > both sys/param.h and sys/types.h.<br> > <br> > Fixes: 032fbda024d78<br> > Sponsored by: Netflix<br> > ---<br> > sys/dev/nvme/nvme.h | 11 ++++-------<br> > 1 file changed, 4 insertions(+), 7 deletions(-)<br> > <br> > diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h<br> > index 3de65a4a481f..ddbc149802f4 100644<br> > --- a/sys/dev/nvme/nvme.h<br> > +++ b/sys/dev/nvme/nvme.h<br> > @@ -29,15 +29,13 @@<br> > #ifndef __NVME_H__<br> > #define __NVME_H__<br> > <br> > -#ifdef _KERNEL<br> > -#include <sys/types.h><br> > -#endif<br> > -<br> > #include <sys/param.h><br> > -#include <sys/endian.h><br> > -#ifndef _KERNEL<br> > +#ifdef _KERNEL<br> > +#include <sys/systm.h><br> > +#else<br> > #include <stdbool.h><br> > #endif<br> > +#include <sys/endian.h><br> > <br> > struct sbuf;<br> > <br> > @@ -1909,7 +1907,6 @@ void nvme_sc_sbuf(const struct nvme_completion *cpl, struct sbuf *sbuf);<br> > void nvme_strvis(uint8_t *dst, const uint8_t *src, int dstlen, int srclen);<br> > <br> > #ifdef _KERNEL<br> > -#include <sys/systm.h><br> > #include <sys/disk.h><br> <br> I should perhaps just move this to the top as well so all the #include's are in one place.<br></blockquote><div><br></div><div>Done </div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrVzK_kY-mG6zonJL1XbzFVvsf_bxA44nYKFMKAJOuSgg>
