From: Dave Jiang <dave.jiang@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>
Subject: Re: [PATCH v2 1/1] libnvdimm: Don't use "proxy" headers
Date: Mon, 30 Jun 2025 14:02:22 -0700 [thread overview]
Message-ID: <4e10c38d-cca3-49c2-a5d8-449fd1c0d9d2@intel.com> (raw)
In-Reply-To: <20250627142001.994860-1-andriy.shevchenko@linux.intel.com>
On 6/27/25 7:19 AM, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.
>
> Note that kernel.h is discouraged to be included as it's written
> at the top of that file.
>
> While doing that, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>
> v2: reshuffled includes and forward declarations (Ira)
>
> include/linux/libnvdimm.h | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
> index e772aae71843..28f086c4a187 100644
> --- a/include/linux/libnvdimm.h
> +++ b/include/linux/libnvdimm.h
> @@ -6,12 +6,12 @@
> */
> #ifndef __LIBNVDIMM_H__
> #define __LIBNVDIMM_H__
> -#include <linux/kernel.h>
> +
> +#include <linux/io.h>
> #include <linux/sizes.h>
> +#include <linux/spinlock.h>
> #include <linux/types.h>
> #include <linux/uuid.h>
> -#include <linux/spinlock.h>
> -#include <linux/bio.h>
>
> struct badrange_entry {
> u64 start;
> @@ -80,7 +80,9 @@ typedef int (*ndctl_fn)(struct nvdimm_bus_descriptor *nd_desc,
> struct nvdimm *nvdimm, unsigned int cmd, void *buf,
> unsigned int buf_len, int *cmd_rc);
>
> +struct attribute_group;
> struct device_node;
> +struct module;
> struct nvdimm_bus_descriptor {
> const struct attribute_group **attr_groups;
> unsigned long cmd_mask;
> @@ -121,6 +123,8 @@ struct nd_mapping_desc {
> int position;
> };
>
> +struct bio;
> +struct resource;
> struct nd_region;
> struct nd_region_desc {
> struct resource *res;
> @@ -147,8 +151,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct device *dev,
> return (void __iomem *) devm_nvdimm_memremap(dev, offset, size, 0);
> }
>
> -struct nvdimm_bus;
> -
> /*
> * Note that separate bits for locked + unlocked are defined so that
> * 'flags == 0' corresponds to an error / not-supported state.
> @@ -238,6 +240,9 @@ struct nvdimm_fw_ops {
> int (*arm)(struct nvdimm *nvdimm, enum nvdimm_fwa_trigger arg);
> };
>
> +struct kobject;
> +struct nvdimm_bus;
> +
> void badrange_init(struct badrange *badrange);
> int badrange_add(struct badrange *badrange, u64 addr, u64 length);
> void badrange_forget(struct badrange *badrange, phys_addr_t start,
next prev parent reply other threads:[~2025-06-30 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 14:19 Andy Shevchenko
2025-06-30 21:02 ` Dave Jiang [this message]
2025-07-01 16:17 ` Ira Weiny
2025-07-01 16:17 ` Ira Weiny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e10c38d-cca3-49c2-a5d8-449fd1c0d9d2@intel.com \
--to=dave.jiang@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®