[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <60f4f153-9947-4730-a72b-2fe3df8d18e9@intel.com>
Date: Tue, 1 Jul 2025 08:16:59 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Cc: Davidlohr Bueso <dave@...olabs.net>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
Alison Schofield <alison.schofield@...el.com>,
Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>, linux-cxl@...r.kernel.org
Subject: Re: [PATCH v2] cxl: make cxl_bus_type constant
On 7/1/25 5:07 AM, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the cxl_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Davidlohr Bueso <dave@...olabs.net>
> Cc: Jonathan Cameron <jonathan.cameron@...wei.com>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Alison Schofield <alison.schofield@...el.com>
> Cc: Vishal Verma <vishal.l.verma@...el.com>
> Cc: Ira Weiny <ira.weiny@...el.com>
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: linux-cxl@...r.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Applied to cxl/next
ac0fe6a5731700bcea6fecfd5d0b76c0454b3a20
> ---
> v2: fix up the subject line to be correct
>
> drivers/cxl/core/port.c | 2 +-
> drivers/cxl/cxl.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c
> index eb46c6764d20..0696f7fcef56 100644
> --- a/drivers/cxl/core/port.c
> +++ b/drivers/cxl/core/port.c
> @@ -2293,7 +2293,7 @@ static const struct attribute_group *cxl_bus_attribute_groups[] = {
> NULL,
> };
>
> -struct bus_type cxl_bus_type = {
> +const struct bus_type cxl_bus_type = {
> .name = "cxl",
> .uevent = cxl_bus_uevent,
> .match = cxl_bus_match,
> diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h
> index 3f1695c96abc..e7b66ca1d423 100644
> --- a/drivers/cxl/cxl.h
> +++ b/drivers/cxl/cxl.h
> @@ -815,7 +815,7 @@ int cxl_dvsec_rr_decode(struct cxl_dev_state *cxlds,
>
> bool is_cxl_region(struct device *dev);
>
> -extern struct bus_type cxl_bus_type;
> +extern const struct bus_type cxl_bus_type;
>
> struct cxl_driver {
> const char *name;
Powered by blists - more mailing lists