From: Cristian Marussi <cristian.marussi@arm.com>
To: "Ricardo B. Marliere" <ricardo@marliere.net>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 2/2] firmware: arm_scmi: make scmi_bus_type const
Date: Tue, 13 Feb 2024 08:57:52 +0000 [thread overview]
Message-ID: <ZcsvEOAmhUNC2lT2@pluto> (raw)
In-Reply-To: <20240211-bus_cleanup-firmware2-v1-2-1851c92c7be7@marliere.net>
On Sun, Feb 11, 2024 at 12:51:30PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the scmi_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> ---
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Thanks,
Cristian
> drivers/firmware/arm_scmi/bus.c | 2 +-
> drivers/firmware/arm_scmi/common.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> index c15928b8c5cc..609a6496c1d4 100644
> --- a/drivers/firmware/arm_scmi/bus.c
> +++ b/drivers/firmware/arm_scmi/bus.c
> @@ -263,7 +263,7 @@ static void scmi_dev_remove(struct device *dev)
> scmi_drv->remove(scmi_dev);
> }
>
> -struct bus_type scmi_bus_type = {
> +const struct bus_type scmi_bus_type = {
> .name = "scmi_protocol",
> .match = scmi_dev_match,
> .probe = scmi_dev_probe,
> diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
> index 00b165d1f502..6affbfdd1dec 100644
> --- a/drivers/firmware/arm_scmi/common.h
> +++ b/drivers/firmware/arm_scmi/common.h
> @@ -141,7 +141,7 @@ scmi_revision_area_get(const struct scmi_protocol_handle *ph);
> void scmi_setup_protocol_implemented(const struct scmi_protocol_handle *ph,
> u8 *prot_imp);
>
> -extern struct bus_type scmi_bus_type;
> +extern const struct bus_type scmi_bus_type;
>
> #define SCMI_BUS_NOTIFY_DEVICE_REQUEST 0
> #define SCMI_BUS_NOTIFY_DEVICE_UNREQUEST 1
>
> --
> 2.43.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-13 8:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-11 15:51 [PATCH 0/2] firmware: struct bus_type cleanup Ricardo B. Marliere
2024-02-11 15:51 ` [PATCH 1/2] firmware: arm_ffa: Make ffa_bus_type const Ricardo B. Marliere
2024-02-13 8:57 ` Cristian Marussi
2024-02-11 15:51 ` [PATCH 2/2] firmware: arm_scmi: make scmi_bus_type const Ricardo B. Marliere
2024-02-13 8:57 ` Cristian Marussi [this message]
2024-02-12 10:46 ` [PATCH 0/2] firmware: struct bus_type cleanup Greg Kroah-Hartman
2024-02-22 7:38 ` Sudeep Holla
2024-02-22 9:07 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZcsvEOAmhUNC2lT2@pluto \
--to=cristian.marussi@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ricardo@marliere.net \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).