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 1/2] firmware: arm_ffa: Make ffa_bus_type const
Date: Tue, 13 Feb 2024 08:57:18 +0000 [thread overview]
Message-ID: <Zcsu7nj1MPzrES2x@pluto> (raw)
In-Reply-To: <20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net>
On Sun, Feb 11, 2024 at 12:51:29PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ffa_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_ffa/bus.c | 2 +-
> include/linux/arm_ffa.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
> index 1c7940ba5539..2f557e90f2eb 100644
> --- a/drivers/firmware/arm_ffa/bus.c
> +++ b/drivers/firmware/arm_ffa/bus.c
> @@ -105,7 +105,7 @@ static struct attribute *ffa_device_attributes_attrs[] = {
> };
> ATTRIBUTE_GROUPS(ffa_device_attributes);
>
> -struct bus_type ffa_bus_type = {
> +const struct bus_type ffa_bus_type = {
> .name = "arm_ffa",
> .match = ffa_device_match,
> .probe = ffa_device_probe,
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index 3d0fde57ba90..c906f666ff5d 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -209,7 +209,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) { return false; }
> #define module_ffa_driver(__ffa_driver) \
> module_driver(__ffa_driver, ffa_register, ffa_unregister)
>
> -extern struct bus_type ffa_bus_type;
> +extern const struct bus_type ffa_bus_type;
>
> /* FFA transport related */
> struct ffa_partition_info {
>
> --
> 2.43.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
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 1/2] firmware: arm_ffa: Make ffa_bus_type const
Date: Tue, 13 Feb 2024 08:57:18 +0000 [thread overview]
Message-ID: <Zcsu7nj1MPzrES2x@pluto> (raw)
In-Reply-To: <20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net>
On Sun, Feb 11, 2024 at 12:51:29PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the ffa_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_ffa/bus.c | 2 +-
> include/linux/arm_ffa.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
> index 1c7940ba5539..2f557e90f2eb 100644
> --- a/drivers/firmware/arm_ffa/bus.c
> +++ b/drivers/firmware/arm_ffa/bus.c
> @@ -105,7 +105,7 @@ static struct attribute *ffa_device_attributes_attrs[] = {
> };
> ATTRIBUTE_GROUPS(ffa_device_attributes);
>
> -struct bus_type ffa_bus_type = {
> +const struct bus_type ffa_bus_type = {
> .name = "arm_ffa",
> .match = ffa_device_match,
> .probe = ffa_device_probe,
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index 3d0fde57ba90..c906f666ff5d 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
> @@ -209,7 +209,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) { return false; }
> #define module_ffa_driver(__ffa_driver) \
> module_driver(__ffa_driver, ffa_register, ffa_unregister)
>
> -extern struct bus_type ffa_bus_type;
> +extern const struct bus_type ffa_bus_type;
>
> /* FFA transport related */
> struct ffa_partition_info {
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-02-13 8:57 UTC|newest]
Thread overview: 16+ 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 ` Ricardo B. Marliere
2024-02-11 15:51 ` [PATCH 1/2] firmware: arm_ffa: Make ffa_bus_type const Ricardo B. Marliere
2024-02-11 15:51 ` Ricardo B. Marliere
2024-02-13 8:57 ` Cristian Marussi [this message]
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-11 15:51 ` Ricardo B. Marliere
2024-02-13 8:57 ` Cristian Marussi
2024-02-13 8:57 ` Cristian Marussi
2024-02-12 10:46 ` [PATCH 0/2] firmware: struct bus_type cleanup Greg Kroah-Hartman
2024-02-12 10:46 ` Greg Kroah-Hartman
2024-02-22 7:38 ` Sudeep Holla
2024-02-22 7:38 ` Sudeep Holla
2024-02-22 9:07 ` 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=Zcsu7nj1MPzrES2x@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.