drivers/ssb/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Now that the driver core can properly handle constant struct bus_type,
move the ssb_bustype 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>
---
drivers/ssb/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index b9934b9c2d70..9f30e0edadfe 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -384,7 +384,7 @@ static struct attribute *ssb_device_attrs[] = {
};
ATTRIBUTE_GROUPS(ssb_device);
-static struct bus_type ssb_bustype = {
+static const struct bus_type ssb_bustype = {
.name = "ssb",
.match = ssb_bus_match,
.probe = ssb_device_probe,
---
base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
change-id: 20240204-bus_cleanup-ssb-64aef4eda20e
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
"Ricardo B. Marliere" <ricardo@marliere.net> wrote: > Now that the driver core can properly handle constant struct bus_type, > move the ssb_bustype 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> > Acked-by: Michael Büsch <m@bues.ch> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Patch applied to wireless-next.git, thanks. 78092e68557b ssb: make ssb_bustype const -- https://patchwork.kernel.org/project/linux-wireless/patch/20240204-bus_cleanup-ssb-v1-1-511026cd5f3c@marliere.net/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the ssb_bustype 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes: > On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote: >> Now that the driver core can properly handle constant struct bus_type, >> move the ssb_bustype 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Greg, I saw your Reviewed-by email 7 times. Not sure if the problem is on my end or your end but wanted to make sure you are aware of it. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
On Tue, Feb 06, 2024 at 08:31:44AM +0200, Kalle Valo wrote: > Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes: > > > On Sun, Feb 04, 2024 at 05:44:21PM -0300, Ricardo B. Marliere wrote: > >> Now that the driver core can properly handle constant struct bus_type, > >> move the ssb_bustype 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Greg, I saw your Reviewed-by email 7 times. Not sure if the problem is > on my end or your end but wanted to make sure you are aware of it. Yes, sorry, happened due to writing emails on a plane without a fully working internet connection :( My fault. greg k-h
On Sun, 04 Feb 2024 17:44:21 -0300
"Ricardo B. Marliere" <ricardo@marliere.net> wrote:
> --- a/drivers/ssb/main.c
> +++ b/drivers/ssb/main.c
> @@ -384,7 +384,7 @@ static struct attribute *ssb_device_attrs[] = {
> };
> ATTRIBUTE_GROUPS(ssb_device);
>
> -static struct bus_type ssb_bustype = {
> +static const struct bus_type ssb_bustype = {
> .name = "ssb",
> .match = ssb_bus_match,
> .probe = ssb_device_probe,
Acked-by: Michael Büsch <m@bues.ch>
--
Michael Büsch
https://bues.ch/
© 2016 - 2026 Red Hat, Inc.