* [PATCH] const_structs.checkpatch: add bus_type
@ 2024-02-04 22:39 Ricardo B. Marliere
2024-02-05 12:02 ` Thomas Weißschuh
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 22:39 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn
Cc: Greg Kroah-Hartman, linux-kernel, Thomas Weißschuh,
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. Make sure that new usages of the struct already enter the tree
as const.
Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
scripts/const_structs.checkpatch | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/const_structs.checkpatch b/scripts/const_structs.checkpatch
index 188412aa2757..7427313adc7a 100644
--- a/scripts/const_structs.checkpatch
+++ b/scripts/const_structs.checkpatch
@@ -2,6 +2,7 @@ acpi_dock_ops
address_space_operations
backlight_ops
block_device_operations
+bus_type
clk_ops
comedi_lrange
component_ops
---
base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
change-id: 20240204-bus_cleanup-checkpatch-719a62209250
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] const_structs.checkpatch: add bus_type
2024-02-04 22:39 [PATCH] const_structs.checkpatch: add bus_type Ricardo B. Marliere
@ 2024-02-05 12:02 ` Thomas Weißschuh
2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-05 17:37 ` Joe Perches
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2024-02-05 12:02 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
Greg Kroah-Hartman, linux-kernel
On 2024-02-04 19:39:57-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. Make sure that new usages of the struct already enter the tree
> as const.
>
> Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> scripts/const_structs.checkpatch | 1 +
> 1 file changed, 1 insertion(+)
>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] const_structs.checkpatch: add bus_type
2024-02-04 22:39 [PATCH] const_structs.checkpatch: add bus_type Ricardo B. Marliere
2024-02-05 12:02 ` Thomas Weißschuh
@ 2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-05 17:37 ` Joe Perches
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:45 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
linux-kernel, Thomas Weißschuh
On Sun, Feb 04, 2024 at 07:39:57PM -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. Make sure that new usages of the struct already enter the tree
> as const.
>
> Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Note, there are a handful of in-kernel instances where this will not
work, but it's not worth special-casing them, they will be obvious when
attempts to change them happen.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] const_structs.checkpatch: add bus_type
2024-02-04 22:39 [PATCH] const_structs.checkpatch: add bus_type Ricardo B. Marliere
2024-02-05 12:02 ` Thomas Weißschuh
2024-02-05 12:45 ` Greg Kroah-Hartman
@ 2024-02-05 17:37 ` Joe Perches
2 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2024-02-05 17:37 UTC (permalink / raw)
To: Ricardo B. Marliere, Andy Whitcroft, Dwaipayan Ray,
Lukas Bulwahn, Andrew Morton
Cc: Greg Kroah-Hartman, linux-kernel, Thomas Weißschuh
On Sun, 2024-02-04 at 19:39 -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. Make sure that new usages of the struct already enter the tree
> as const.
>
> Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Andrew? Can you please pick this up?
> ---
> scripts/const_structs.checkpatch | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/const_structs.checkpatch b/scripts/const_structs.checkpatch
> index 188412aa2757..7427313adc7a 100644
> --- a/scripts/const_structs.checkpatch
> +++ b/scripts/const_structs.checkpatch
> @@ -2,6 +2,7 @@ acpi_dock_ops
> address_space_operations
> backlight_ops
> block_device_operations
> +bus_type
> clk_ops
> comedi_lrange
> component_ops
>
> ---
> base-commit: 41b9fb381a486360b2daaec0c7480f8e3ff72bc7
> change-id: 20240204-bus_cleanup-checkpatch-719a62209250
>
> Best regards,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-05 19:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 22:39 [PATCH] const_structs.checkpatch: add bus_type Ricardo B. Marliere
2024-02-05 12:02 ` Thomas Weißschuh
2024-02-05 12:45 ` Greg Kroah-Hartman
2024-02-05 17:37 ` Joe Perches
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®