* [PATCH v2] siox: make siox_bus_type const
@ 2024-02-04 22:26 Ricardo B. Marliere
2024-02-05 9:03 ` Uwe Kleine-König
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 22:26 UTC (permalink / raw)
To: Thorsten Scherer, Uwe Kleine-König, Pengutronix Kernel Team
Cc: linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
a const *"), the driver core can properly handle constant struct
bus_type. Move the siox_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>
---
Changes in v2:
- Fixed changelog: mentioned commit d492cc2573a0 instead of the word
"Now".
- Link to v1: https://lore.kernel.org/r/20240204-bus_cleanup-siox-v1-1-2d12583d3a6c@marliere.net
---
drivers/siox/siox-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c
index 561408583b2b..a1eda7bd76ed 100644
--- a/drivers/siox/siox-core.c
+++ b/drivers/siox/siox-core.c
@@ -543,7 +543,7 @@ static void siox_shutdown(struct device *dev)
sdriver->shutdown(sdevice);
}
-static struct bus_type siox_bus_type = {
+static const struct bus_type siox_bus_type = {
.name = "siox",
.match = siox_match,
.probe = siox_probe,
---
base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
change-id: 20240204-bus_cleanup-siox-ccf8775bf069
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] siox: make siox_bus_type const
2024-02-04 22:26 [PATCH v2] siox: make siox_bus_type const Ricardo B. Marliere
@ 2024-02-05 9:03 ` Uwe Kleine-König
2024-02-05 12:05 ` Ricardo B. Marliere
2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-09 18:13 ` Thorsten Scherer
2 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2024-02-05 9:03 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Thorsten Scherer, Pengutronix Kernel Team, Greg Kroah-Hartman,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]
Hello Ricardo,
On Sun, Feb 04, 2024 at 07:26:42PM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type. Move the siox_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>
I currently have no setup to test this, but compilation is fine, and I
don't expect any surprises.
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thanks for your patch,
Uwe
PS: b4 gave me:
✗ [PATCH v2] siox: make siox_bus_type const
✗ No key: openpgp/ricardo@marliere.net
✗ BADSIG: DKIM/marliere.net
when applying your patch. I didn't check the details of the DKIM issue. I
quickly tried to find your pgp key, but failed (wks, kernel-pgpkeys
repo, keyserver).
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] siox: make siox_bus_type const
2024-02-05 9:03 ` Uwe Kleine-König
@ 2024-02-05 12:05 ` Ricardo B. Marliere
0 siblings, 0 replies; 5+ messages in thread
From: Ricardo B. Marliere @ 2024-02-05 12:05 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Thorsten Scherer, Pengutronix Kernel Team, Greg Kroah-Hartman,
linux-kernel
On 5 Feb 10:03, Uwe Kleine-König wrote:
> Hello Ricardo,
>
> On Sun, Feb 04, 2024 at 07:26:42PM -0300, Ricardo B. Marliere wrote:
> > Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> > a const *"), the driver core can properly handle constant struct
> > bus_type. Move the siox_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>
>
> I currently have no setup to test this, but compilation is fine, and I
> don't expect any surprises.
>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>
> Thanks for your patch,
> Uwe
>
> PS: b4 gave me:
>
> ✗ [PATCH v2] siox: make siox_bus_type const
> ✗ No key: openpgp/ricardo@marliere.net
> ✗ BADSIG: DKIM/marliere.net
>
> when applying your patch. I didn't check the details of the DKIM issue. I
> quickly tried to find your pgp key, but failed (wks, kernel-pgpkeys
> repo, keyserver).
Thanks for the heads up, I'll go check what's wrong. I think I only
published the @gmail.com one.!
Best regards,
- Ricardo.
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | https://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] siox: make siox_bus_type const
2024-02-04 22:26 [PATCH v2] siox: make siox_bus_type const Ricardo B. Marliere
2024-02-05 9:03 ` Uwe Kleine-König
@ 2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-09 18:13 ` Thorsten Scherer
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:45 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Thorsten Scherer, Uwe Kleine-König, Pengutronix Kernel Team,
linux-kernel
On Sun, Feb 04, 2024 at 07:26:42PM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type. Move the siox_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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] siox: make siox_bus_type const
2024-02-04 22:26 [PATCH v2] siox: make siox_bus_type const Ricardo B. Marliere
2024-02-05 9:03 ` Uwe Kleine-König
2024-02-05 12:45 ` Greg Kroah-Hartman
@ 2024-02-09 18:13 ` Thorsten Scherer
2 siblings, 0 replies; 5+ messages in thread
From: Thorsten Scherer @ 2024-02-09 18:13 UTC (permalink / raw)
To: Ricardo B. Marliere, Greg Kroah-Hartman
Cc: Uwe Kleine-König, Pengutronix Kernel Team, linux-kernel,
Thorsten Scherer
Hello,
On Sun, Feb 04, 2024 at 07:26:42PM -0300, Ricardo B. Marliere wrote:
> Since commit d492cc2573a0 ("driver core: device.h: make struct bus_type
> a const *"), the driver core can properly handle constant struct
> bus_type. Move the siox_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>
Acked-by: Thorsten Scherer <t.scherer@eckelmann.de>
@Ricardo: Thank you!
@gregkh: Would you please pick up this patch?
> ---
> Changes in v2:
> - Fixed changelog: mentioned commit d492cc2573a0 instead of the word
> "Now".
> - Link to v1: https://lore.kernel.org/r/20240204-bus_cleanup-siox-v1-1-2d12583d3a6c@marliere.net
> ---
> drivers/siox/siox-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c
> index 561408583b2b..a1eda7bd76ed 100644
> --- a/drivers/siox/siox-core.c
> +++ b/drivers/siox/siox-core.c
> @@ -543,7 +543,7 @@ static void siox_shutdown(struct device *dev)
> sdriver->shutdown(sdevice);
> }
>
> -static struct bus_type siox_bus_type = {
> +static const struct bus_type siox_bus_type = {
> .name = "siox",
> .match = siox_match,
> .probe = siox_probe,
>
> ---
> base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
> change-id: 20240204-bus_cleanup-siox-ccf8775bf069
>
> Best regards,
> --
> Ricardo B. Marliere <ricardo@marliere.net>
>
Best regards
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-09 18:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 22:26 [PATCH v2] siox: make siox_bus_type const Ricardo B. Marliere
2024-02-05 9:03 ` Uwe Kleine-König
2024-02-05 12:05 ` Ricardo B. Marliere
2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-09 18:13 ` Thorsten Scherer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®