diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-04 14:56:44 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-22 19:24:54 +0100 |
commit | e374ae2be2f7cb4aad46e17e3fa5da7bbb0d2a09 (patch) | |
tree | a528ae0b7c7e36ecd60632c78e19c86de1f1626b | |
parent | mm/vmscan: make too_many_isolated return bool (diff) | |
download | linux-e374ae2be2f7cb4aad46e17e3fa5da7bbb0d2a09.tar.xz linux-e374ae2be2f7cb4aad46e17e3fa5da7bbb0d2a09.zip |
memory tier: make memory_tier_subsys const
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.
Link: https://lkml.kernel.org/r/20240204-bus_cleanup-mm-v1-1-00f49286f164@marliere.net
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/memory-tiers.c | 2 |
1 files changed, 1 insertions, 1 deletions
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", }; |