lkml.org 
[lkml]   [2023]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [PATCH 23/36] driver core: bus: mark the struct bus_type for sysfs callbacks as constant
Greg Kroah-Hartman wrote:
> struct bus_type should never be modified in a sysfs callback as there is
> nothing in the structure to modify, and frankly, the structure is almost
> never used in a sysfs callback, so mark it as constant to allow struct
> bus_type to be moved to read-only memory.
>
[..]
> Cc: Dan Williams <dan.j.williams@intel.com>
[..]
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index 8ee6b6e2e2a4..66333cd6248e 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -1927,7 +1927,7 @@ bool schedule_cxl_memdev_detach(struct cxl_memdev *cxlmd)
> EXPORT_SYMBOL_NS_GPL(schedule_cxl_memdev_detach, CXL);
>
> /* for user tooling to ensure port disable work has completed */
> -static ssize_t flush_store(struct bus_type *bus, const char *buf, size_t count)
> +static ssize_t flush_store(const struct bus_type *bus, const char *buf, size_t count)
> {
> if (sysfs_streq(buf, "1")) {
> flush_workqueue(cxl_bus_wq);

For CXL:

Acked-by: Dan Williams <dan.j.williams@intel.com>

\
 
 \ /
  Last update: 2023-03-27 01:00    [W:0.446 / U:1.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site