[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6410b248e47ca_58a429425@dwillia2-xfh.jf.intel.com.notmuch>
Date: Tue, 14 Mar 2023 10:43:36 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>
CC: <rafael@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"David S. Miller" <davem@...emloft.net>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Alex Shi <alexs@...nel.org>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Alexandre Bounine <alex.bou9@...il.com>,
Alison Schofield <alison.schofield@...el.com>,
"Ben Widawsky" <bwidawsk@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Dan Williams" <dan.j.williams@...el.com>,
Dexuan Cui <decui@...rosoft.com>,
"Eric Dumazet" <edumazet@...gle.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"Hannes Reinecke" <hare@...e.de>,
Harald Freudenberger <freude@...ux.ibm.com>,
"Heiko Carstens" <hca@...ux.ibm.com>, Hu Haowen <src.res@...il.cn>,
Ilya Dryomov <idryomov@...il.com>,
Ira Weiny <ira.weiny@...el.com>,
Iwona Winiarska <iwona.winiarska@...el.com>,
Jakub Kicinski <kuba@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Jonathan Corbet <corbet@....net>,
Laurentiu Tudor <laurentiu.tudor@....com>,
Matt Porter <mporter@...nel.crashing.org>,
"Michael Ellerman" <mpe@...erman.id.au>,
Paolo Abeni <pabeni@...hat.com>,
Stuart Yoder <stuyoder@...il.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Vishal Verma <vishal.l.verma@...el.com>,
Wei Liu <wei.liu@...nel.org>,
Yanteng Si <siyanteng@...ngson.cn>
Subject: RE: [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@...el.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@...el.com>
Powered by blists - more mailing lists