mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwtracing: intel_th: make intel_th_bus const
@ 2025-09-18 13:39 Adrian Barnaś
  2025-09-18 16:19 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Barnaś @ 2025-09-18 13:39 UTC (permalink / raw)
  To: Alexander Shishkin, linux-kernel; +Cc: Greg Kroah-Hartman, Adrian Barnaś

Because driver core can properly handle constant struct bus_type,
move the intel_th_bus to be a constant structure as well, placing it into
read-only memory which can not be modified at runtime.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
---
 drivers/hwtracing/intel_th/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index 47d9e6c3bac0..ba7c8b184cbc 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -166,7 +166,7 @@ static void intel_th_remove(struct device *dev)
 	pm_runtime_enable(dev);
 }
 
-static struct bus_type intel_th_bus = {
+static const struct bus_type intel_th_bus = {
 	.name		= "intel_th",
 	.match		= intel_th_match,
 	.probe		= intel_th_probe,
-- 
2.51.0.470.ga7dc726c21-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwtracing: intel_th: make intel_th_bus const
  2025-09-18 13:39 [PATCH] hwtracing: intel_th: make intel_th_bus const Adrian Barnaś
@ 2025-09-18 16:19 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-09-18 16:19 UTC (permalink / raw)
  To: Adrian Barnaś; +Cc: Alexander Shishkin, linux-kernel

On Thu, Sep 18, 2025 at 01:39:37PM +0000, Adrian Barnaś wrote:
> Because driver core can properly handle constant struct bus_type,
> move the intel_th_bus to be a constant structure as well, placing it into
> read-only memory which can not be modified at runtime.
> 
> Signed-off-by: Adrian Barnaś <abarnas@google.com>
> ---
>  drivers/hwtracing/intel_th/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
> index 47d9e6c3bac0..ba7c8b184cbc 100644
> --- a/drivers/hwtracing/intel_th/core.c
> +++ b/drivers/hwtracing/intel_th/core.c
> @@ -166,7 +166,7 @@ static void intel_th_remove(struct device *dev)
>  	pm_runtime_enable(dev);
>  }
>  
> -static struct bus_type intel_th_bus = {
> +static const struct bus_type intel_th_bus = {
>  	.name		= "intel_th",
>  	.match		= intel_th_match,
>  	.probe		= intel_th_probe,
> -- 
> 2.51.0.470.ga7dc726c21-goog
> 

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-18 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-18 13:39 [PATCH] hwtracing: intel_th: make intel_th_bus const Adrian Barnaś
2025-09-18 16:19 ` Greg Kroah-Hartman

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®