* [PATCH] coresight: make coresight_bustype const
@ 2024-01-05 12:33 Greg Kroah-Hartman
2024-01-05 14:22 ` Suzuki K Poulose
2024-02-12 11:30 ` Suzuki K Poulose
0 siblings, 2 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-01-05 12:33 UTC (permalink / raw)
To: coresight
Cc: linux-kernel, Greg Kroah-Hartman, Suzuki K Poulose, Mike Leach,
James Clark, Leo Yan, Alexander Shishkin, linux-arm-kernel
Now that the driver core can properly handle constant struct bus_type,
move the coresight_bustype variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: James Clark <james.clark@arm.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwtracing/coresight/coresight-core.c | 2 +-
include/linux/coresight.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 9fabe00a40d6..24c49e581737 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -1796,7 +1796,7 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
}
EXPORT_SYMBOL_GPL(coresight_alloc_device_name);
-struct bus_type coresight_bustype = {
+const struct bus_type coresight_bustype = {
.name = "coresight",
};
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index a269fffaf991..8fe75a0d7693 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -35,7 +35,7 @@
#define CORESIGHT_UNLOCK 0xc5acce55
-extern struct bus_type coresight_bustype;
+extern const struct bus_type coresight_bustype;
enum coresight_dev_type {
CORESIGHT_DEV_TYPE_SINK,
--
2.43.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] coresight: make coresight_bustype const
2024-01-05 12:33 [PATCH] coresight: make coresight_bustype const Greg Kroah-Hartman
@ 2024-01-05 14:22 ` Suzuki K Poulose
2024-01-05 14:40 ` Greg Kroah-Hartman
2024-02-12 11:30 ` Suzuki K Poulose
1 sibling, 1 reply; 4+ messages in thread
From: Suzuki K Poulose @ 2024-01-05 14:22 UTC (permalink / raw)
To: Greg Kroah-Hartman, coresight
Cc: linux-kernel, Mike Leach, James Clark, Leo Yan,
Alexander Shishkin, linux-arm-kernel
On 05/01/2024 12:33, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the coresight_bustype variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: James Clark <james.clark@arm.com>
> Cc: Leo Yan <leo.yan@linaro.org>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: coresight@lists.linaro.org
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/hwtracing/coresight/coresight-core.c | 2 +-
> include/linux/coresight.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 9fabe00a40d6..24c49e581737 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1796,7 +1796,7 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
> }
> EXPORT_SYMBOL_GPL(coresight_alloc_device_name);
>
> -struct bus_type coresight_bustype = {
> +const struct bus_type coresight_bustype = {
> .name = "coresight",
> };
>
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index a269fffaf991..8fe75a0d7693 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -35,7 +35,7 @@
>
> #define CORESIGHT_UNLOCK 0xc5acce55
>
> -extern struct bus_type coresight_bustype;
> +extern const struct bus_type coresight_bustype;
Thanks, for the patch. I will queue this for v6.8.
Thanks
Suzuki
>
> enum coresight_dev_type {
> CORESIGHT_DEV_TYPE_SINK,
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] coresight: make coresight_bustype const
2024-01-05 14:22 ` Suzuki K Poulose
@ 2024-01-05 14:40 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-01-05 14:40 UTC (permalink / raw)
To: Suzuki K Poulose
Cc: coresight, linux-kernel, Mike Leach, James Clark, Leo Yan,
Alexander Shishkin, linux-arm-kernel
On Fri, Jan 05, 2024 at 02:22:43PM +0000, Suzuki K Poulose wrote:
> On 05/01/2024 12:33, Greg Kroah-Hartman wrote:
> > Now that the driver core can properly handle constant struct bus_type,
> > move the coresight_bustype variable to be a constant structure as well,
> > placing it into read-only memory which can not be modified at runtime.
> >
> > Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> > Cc: Mike Leach <mike.leach@linaro.org>
> > Cc: James Clark <james.clark@arm.com>
> > Cc: Leo Yan <leo.yan@linaro.org>
> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > Cc: coresight@lists.linaro.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> > drivers/hwtracing/coresight/coresight-core.c | 2 +-
> > include/linux/coresight.h | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> > index 9fabe00a40d6..24c49e581737 100644
> > --- a/drivers/hwtracing/coresight/coresight-core.c
> > +++ b/drivers/hwtracing/coresight/coresight-core.c
> > @@ -1796,7 +1796,7 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict,
> > }
> > EXPORT_SYMBOL_GPL(coresight_alloc_device_name);
> > -struct bus_type coresight_bustype = {
> > +const struct bus_type coresight_bustype = {
> > .name = "coresight",
> > };
> > diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> > index a269fffaf991..8fe75a0d7693 100644
> > --- a/include/linux/coresight.h
> > +++ b/include/linux/coresight.h
> > @@ -35,7 +35,7 @@
> > #define CORESIGHT_UNLOCK 0xc5acce55
> > -extern struct bus_type coresight_bustype;
> > +extern const struct bus_type coresight_bustype;
>
> Thanks, for the patch. I will queue this for v6.8.
Thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] coresight: make coresight_bustype const
2024-01-05 12:33 [PATCH] coresight: make coresight_bustype const Greg Kroah-Hartman
2024-01-05 14:22 ` Suzuki K Poulose
@ 2024-02-12 11:30 ` Suzuki K Poulose
1 sibling, 0 replies; 4+ messages in thread
From: Suzuki K Poulose @ 2024-02-12 11:30 UTC (permalink / raw)
To: coresight, Greg Kroah-Hartman
Cc: Suzuki K Poulose, James Clark, linux-kernel, Alexander Shishkin,
Leo Yan, linux-arm-kernel, Mike Leach
On Fri, 5 Jan 2024 13:33:32 +0100, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the coresight_bustype variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
>
Moved to next, thanks!
[1/1] coresight: make coresight_bustype const
https://git.kernel.org/coresight/c/dd95255d44c0
Best regards,
--
Suzuki K Poulose <suzuki.poulose@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-12 11:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 12:33 [PATCH] coresight: make coresight_bustype const Greg Kroah-Hartman
2024-01-05 14:22 ` Suzuki K Poulose
2024-01-05 14:40 ` Greg Kroah-Hartman
2024-02-12 11:30 ` Suzuki K Poulose
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox