mm/memory_hotplug: add static qualifier for online_policy_to_str()
authorTang Yizhou <tangyizhou@huawei.com>
Fri, 5 Nov 2021 20:44:08 +0000 (13:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:42 +0000 (13:30 -0700)
online_policy_to_str is only used in memory_hotplug.c and should be
defined as static.

Link: https://lkml.kernel.org/r/20210913024534.26161-1-tangyizhou@huawei.com
Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c

index feffaa9..afaae37 100644 (file)
@@ -57,7 +57,7 @@ enum {
        ONLINE_POLICY_AUTO_MOVABLE,
 };
 
-const char *online_policy_to_str[] = {
+static const char * const online_policy_to_str[] = {
        [ONLINE_POLICY_CONTIG_ZONES] = "contig-zones",
        [ONLINE_POLICY_AUTO_MOVABLE] = "auto-movable",
 };