Skip to content

Commit 536f594

Browse files
andy-shevweiny2
authored andcommitted
libnvdimm: Don't use "proxy" headers
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. Reviewed-by: Dave Jiang <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Ira Weiny <[email protected]>
1 parent d0b3b7b commit 536f594

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

include/linux/libnvdimm.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77
#ifndef __LIBNVDIMM_H__
88
#define __LIBNVDIMM_H__
9-
#include <linux/kernel.h>
9+
10+
#include <linux/io.h>
1011
#include <linux/sizes.h>
12+
#include <linux/spinlock.h>
1113
#include <linux/types.h>
1214
#include <linux/uuid.h>
13-
#include <linux/spinlock.h>
14-
#include <linux/bio.h>
1515

1616
struct badrange_entry {
1717
u64 start;
@@ -80,7 +80,9 @@ typedef int (*ndctl_fn)(struct nvdimm_bus_descriptor *nd_desc,
8080
struct nvdimm *nvdimm, unsigned int cmd, void *buf,
8181
unsigned int buf_len, int *cmd_rc);
8282

83+
struct attribute_group;
8384
struct device_node;
85+
struct module;
8486
struct nvdimm_bus_descriptor {
8587
const struct attribute_group **attr_groups;
8688
unsigned long cmd_mask;
@@ -121,6 +123,8 @@ struct nd_mapping_desc {
121123
int position;
122124
};
123125

126+
struct bio;
127+
struct resource;
124128
struct nd_region;
125129
struct nd_region_desc {
126130
struct resource *res;
@@ -147,8 +151,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct device *dev,
147151
return (void __iomem *) devm_nvdimm_memremap(dev, offset, size, 0);
148152
}
149153

150-
struct nvdimm_bus;
151-
152154
/*
153155
* Note that separate bits for locked + unlocked are defined so that
154156
* 'flags == 0' corresponds to an error / not-supported state.
@@ -238,6 +240,9 @@ struct nvdimm_fw_ops {
238240
int (*arm)(struct nvdimm *nvdimm, enum nvdimm_fwa_trigger arg);
239241
};
240242

243+
struct kobject;
244+
struct nvdimm_bus;
245+
241246
void badrange_init(struct badrange *badrange);
242247
int badrange_add(struct badrange *badrange, u64 addr, u64 length);
243248
void badrange_forget(struct badrange *badrange, phys_addr_t start,

0 commit comments

Comments
 (0)