diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-24 12:58:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-02-24 12:58:55 -0800 |
commit | a93e884edf61f9debc9ca61ef9e545f0394ab666 (patch) | |
tree | 4ec0250445def96c527d390385d4115e22dc1528 /drivers/nvdimm | |
parent | 693fed981eb9bf6e70bfda66bb872e2bb8155671 (diff) | |
parent | 88cd618dcc7b63baa1478730b02eaba3e3148467 (diff) | |
download | lwn-a93e884edf61f9debc9ca61ef9e545f0394ab666.tar.gz lwn-a93e884edf61f9debc9ca61ef9e545f0394ab666.zip |
Merge tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here is the large set of driver core changes for 6.3-rc1.
There's a lot of changes this development cycle, most of the work
falls into two different categories:
- fw_devlink fixes and updates. This has gone through numerous review
cycles and lots of review and testing by lots of different devices.
Hopefully all should be good now, and Saravana will be keeping a
watch for any potential regression on odd embedded systems.
- driver core changes to work to make struct bus_type able to be
moved into read-only memory (i.e. const) The recent work with Rust
has pointed out a number of areas in the driver core where we are
passing around and working with structures that really do not have
to be dynamic at all, and they should be able to be read-only
making things safer overall. This is the contuation of that work
(started last release with kobject changes) in moving struct
bus_type to be constant. We didn't quite make it for this release,
but the remaining patches will be finished up for the release after
this one, but the groundwork has been laid for this effort.
Other than that we have in here:
- debugfs memory leak fixes in some subsystems
- error path cleanups and fixes for some never-able-to-be-hit
codepaths.
- cacheinfo rework and fixes
- Other tiny fixes, full details are in the shortlog
All of these have been in linux-next for a while with no reported
problems"
[ Geert Uytterhoeven points out that that last sentence isn't true, and
that there's a pending report that has a fix that is queued up - Linus ]
* tag 'driver-core-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (124 commits)
debugfs: drop inline constant formatting for ERR_PTR(-ERROR)
OPP: fix error checking in opp_migrate_dentry()
debugfs: update comment of debugfs_rename()
i3c: fix device.h kernel-doc warnings
dma-mapping: no need to pass a bus_type into get_arch_dma_ops()
driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place
Revert "driver core: add error handling for devtmpfs_create_node()"
Revert "devtmpfs: add debug info to handle()"
Revert "devtmpfs: remove return value of devtmpfs_delete_node()"
driver core: cpu: don't hand-override the uevent bus_type callback.
devtmpfs: remove return value of devtmpfs_delete_node()
devtmpfs: add debug info to handle()
driver core: add error handling for devtmpfs_create_node()
driver core: bus: update my copyright notice
driver core: bus: add bus_get_dev_root() function
driver core: bus: constify bus_unregister()
driver core: bus: constify some internal functions
driver core: bus: constify bus_get_kset()
driver core: bus: constify bus_register/unregister_notifier()
driver core: remove private pointer from struct bus_type
...
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/bus.c | 4 | ||||
-rw-r--r-- | drivers/nvdimm/dax_devs.c | 2 | ||||
-rw-r--r-- | drivers/nvdimm/dimm_devs.c | 2 | ||||
-rw-r--r-- | drivers/nvdimm/nd-core.h | 10 | ||||
-rw-r--r-- | drivers/nvdimm/nd.h | 4 | ||||
-rw-r--r-- | drivers/nvdimm/region_devs.c | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index b38d0355b0ac..92ce92fc9932 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -28,7 +28,7 @@ static int nvdimm_bus_major; struct class *nd_class; static DEFINE_IDA(nd_ida); -static int to_nd_device_type(struct device *dev) +static int to_nd_device_type(const struct device *dev) { if (is_nvdimm(dev)) return ND_DEVICE_DIMM; @@ -42,7 +42,7 @@ static int to_nd_device_type(struct device *dev) return 0; } -static int nvdimm_bus_uevent(struct device *dev, struct kobj_uevent_env *env) +static int nvdimm_bus_uevent(const struct device *dev, struct kobj_uevent_env *env) { return add_uevent_var(env, "MODALIAS=" ND_DEVICE_MODALIAS_FMT, to_nd_device_type(dev)); diff --git a/drivers/nvdimm/dax_devs.c b/drivers/nvdimm/dax_devs.c index 7f4a9d28b670..3bd61f245788 100644 --- a/drivers/nvdimm/dax_devs.c +++ b/drivers/nvdimm/dax_devs.c @@ -38,7 +38,7 @@ static const struct device_type nd_dax_device_type = { .groups = nd_pfn_attribute_groups, }; -bool is_nd_dax(struct device *dev) +bool is_nd_dax(const struct device *dev) { return dev ? dev->type == &nd_dax_device_type : false; } diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c index 1fc081dcf631..fb571666d33b 100644 --- a/drivers/nvdimm/dimm_devs.c +++ b/drivers/nvdimm/dimm_devs.c @@ -572,7 +572,7 @@ static const struct device_type nvdimm_device_type = { .groups = nvdimm_attribute_groups, }; -bool is_nvdimm(struct device *dev) +bool is_nvdimm(const struct device *dev) { return dev->type == &nvdimm_device_type; } diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index cc86ee09d7c0..ca2bbc57e755 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h @@ -82,14 +82,14 @@ static inline void nvdimm_security_overwrite_query(struct work_struct *work) } #endif -bool is_nvdimm(struct device *dev); -bool is_nd_pmem(struct device *dev); -bool is_nd_volatile(struct device *dev); -static inline bool is_nd_region(struct device *dev) +bool is_nvdimm(const struct device *dev); +bool is_nd_pmem(const struct device *dev); +bool is_nd_volatile(const struct device *dev); +static inline bool is_nd_region(const struct device *dev) { return is_nd_pmem(dev) || is_nd_volatile(dev); } -static inline bool is_memory(struct device *dev) +static inline bool is_memory(const struct device *dev) { return is_nd_pmem(dev) || is_nd_volatile(dev); } diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index ec5219680092..e8b9d27dbb3c 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -599,7 +599,7 @@ static inline int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig) struct nd_dax *to_nd_dax(struct device *dev); #if IS_ENABLED(CONFIG_NVDIMM_DAX) int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); -bool is_nd_dax(struct device *dev); +bool is_nd_dax(const struct device *dev); struct device *nd_dax_create(struct nd_region *nd_region); #else static inline int nd_dax_probe(struct device *dev, @@ -608,7 +608,7 @@ static inline int nd_dax_probe(struct device *dev, return -ENODEV; } -static inline bool is_nd_dax(struct device *dev) +static inline bool is_nd_dax(const struct device *dev) { return false; } diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 83dbf398ea84..8f134d63af13 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -839,12 +839,12 @@ static const struct device_type nd_volatile_device_type = { .groups = nd_region_attribute_groups, }; -bool is_nd_pmem(struct device *dev) +bool is_nd_pmem(const struct device *dev) { return dev ? dev->type == &nd_pmem_device_type : false; } -bool is_nd_volatile(struct device *dev) +bool is_nd_volatile(const struct device *dev) { return dev ? dev->type == &nd_volatile_device_type : false; } |