* [PATCH] memory tier: make memory_tier_subsys const
@ 2024-02-04 13:56 Ricardo B. Marliere
2024-02-04 14:24 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 13:56 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-mm, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Now that the driver core can properly handle constant struct bus_type,
move the memory_tier_subsys 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>
---
mm/memory-tiers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
index 5462d9e3c84c..ed20f96bf89d 100644
--- a/mm/memory-tiers.c
+++ b/mm/memory-tiers.c
@@ -39,7 +39,7 @@ static LIST_HEAD(memory_tiers);
static struct node_memory_type_map node_memory_types[MAX_NUMNODES];
struct memory_dev_type *default_dram_type;
-static struct bus_type memory_tier_subsys = {
+static const struct bus_type memory_tier_subsys = {
.name = "memory_tiering",
.dev_name = "memory_tier",
};
---
base-commit: 91f3daa1765ee4e0c89987dc25f72c40f07af34d
change-id: 20240204-bus_cleanup-mm-d8c2937d6af4
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] memory tier: make memory_tier_subsys const
2024-02-04 13:56 [PATCH] memory tier: make memory_tier_subsys const Ricardo B. Marliere
@ 2024-02-04 14:24 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-04 14:24 UTC (permalink / raw)
To: Ricardo B. Marliere; +Cc: Andrew Morton, linux-mm, linux-kernel
On Sun, Feb 04, 2024 at 10:56:44AM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the memory_tier_subsys 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>
> ---
> mm/memory-tiers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-04 14:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 13:56 [PATCH] memory tier: make memory_tier_subsys const Ricardo B. Marliere
2024-02-04 14:24 ` 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