Re: [PATCH] const_structs.checkpatch: add bus_type

From: Greg Kroah-Hartman
Date: Mon Feb 05 2024 - 14:04:21 EST


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@xxxxxxxxxxxxxx>
> Signed-off-by: Ricardo B. Marliere <ricardo@xxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx>