]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
ras-page-isolation: make memory_location_field static
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:39:21 +0000 (16:39 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:40:23 +0000 (16:40 +0100)
Those structures are used only internally inside the
ras-page-isolation code. They're not public. Make them static.

While here, fix coding style.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
ras-page-isolation.c
ras-page-isolation.h

index 0c08e0dc82d158f33c406b27c36163a049fb4db1..d5edc3bb567764afdc8b71243ca29a1ea29125b3 100644 (file)
@@ -432,26 +432,90 @@ void ras_record_page_error(unsigned long long addr, unsigned int count, time_t t
 /* memory page CE threshold policy ends */
 
 /* memory row CE threshold policy starts */
-const struct memory_location_field apei_fields[] = {
-       [APEI_NODE] = {.name = "node", .anchor_str = "node:", .value_base = 10},
-       [APEI_CARD] = {.name = "card", .anchor_str = "card:", .value_base = 10},
-       [APEI_MODULE] = {.name = "module", .anchor_str = "module:", .value_base = 10},
-       [APEI_RANK] = {.name = "rank", .anchor_str = "rank:", .value_base = 10},
-       [APEI_DEVICE] = {.name = "device", .anchor_str = "device:", .value_base = 10},
-       [APEI_BANK] = {.name = "bank", .anchor_str = "bank:", .value_base = 10},
-       [APEI_ROW] = {.name = "row", .anchor_str = "row:", .value_base = 10},
+static const struct memory_location_field apei_fields[] = {
+       [APEI_NODE] = {
+               .name = "node",
+               .anchor_str = "node:",
+               .value_base = 10
+       },
+       [APEI_CARD] = {
+               .name = "card",
+               .anchor_str = "card:",
+               .value_base = 10
+       },
+       [APEI_MODULE] = {
+               .name = "module",
+               .anchor_str = "module:",
+               .value_base = 10
+       },
+       [APEI_RANK] = {
+               .name = "rank",
+               .anchor_str = "rank:",
+               .value_base = 10
+       },
+       [APEI_DEVICE] = {
+               .name = "device",
+               .anchor_str = "device:",
+               .value_base = 10
+       },
+       [APEI_BANK] = {
+               .name = "bank",
+               .anchor_str = "bank:",
+               .value_base = 10
+       },
+       [APEI_ROW] = {
+               .name = "row",
+               .anchor_str = "row:",
+               .value_base = 10
+       },
 };
 
-const struct memory_location_field dsm_fields[] = {
-       [DSM_ProcessorSocketId] = {.name = "ProcessorSocketId", .anchor_str = "ProcessorSocketId:", .value_base = 16},
-       [DSM_MemoryControllerId] = {.name = "MemoryControllerId", .anchor_str = "MemoryControllerId:", .value_base = 16},
-       [DSM_ChannelId] = {.name = "ChannelId", .anchor_str = "ChannelId:", .value_base = 16},
-       [DSM_DimmSlotId] = {.name = "DimmSlotId", .anchor_str = "DimmSlotId:", .value_base = 16},
-       [DSM_PhysicalRankId] = {.name = "PhysicalRankId", .anchor_str = "PhysicalRankId:", .value_base = 16},
-       [DSM_ChipId] = {.name = "ChipId", .anchor_str = "ChipId:", .value_base = 16},
-       [DSM_BankGroup] = {.name = "BankGroup", .anchor_str = "BankGroup:", .value_base = 16},
-       [DSM_Bank] = {.name = "Bank", .anchor_str = "Bank:", .value_base = 16},
-       [DSM_Row] = {.name = "Row", .anchor_str = "Row:", .value_base = 16},
+static const struct memory_location_field dsm_fields[] = {
+       [DSM_ProcessorSocketId] = {
+               .name = "ProcessorSocketId",
+               .anchor_str = "ProcessorSocketId:",
+               .value_base = 16
+       },
+       [DSM_MemoryControllerId] = {
+               .name = "MemoryControllerId",
+               .anchor_str = "MemoryControllerId:",
+               .value_base = 16
+       },
+       [DSM_ChannelId] = {
+               .name = "ChannelId",
+               .anchor_str = "ChannelId:",
+               .value_base = 16
+       },
+       [DSM_DimmSlotId] = {
+               .name = "DimmSlotId",
+               .anchor_str = "DimmSlotId:",
+               .value_base = 16
+       },
+       [DSM_PhysicalRankId] = {
+               .name = "PhysicalRankId",
+               .anchor_str = "PhysicalRankId:",
+               .value_base = 16
+       },
+       [DSM_ChipId] = {
+               .name = "ChipId",
+               .anchor_str = "ChipId:",
+               .value_base = 16
+       },
+       [DSM_BankGroup] = {
+               .name = "BankGroup",
+               .anchor_str = "BankGroup:",
+               .value_base = 16
+       },
+       [DSM_Bank] = {
+               .name = "Bank",
+               .anchor_str = "Bank:",
+               .value_base = 16
+       },
+       [DSM_Row] = {
+               .name = "Row",
+               .anchor_str = "Row:",
+               .value_base = 16
+       },
 };
 
 static void row_record_get_id(struct row_record *rr,
index bc224b035dd56d3db5585b289101a3adf5e5167f..25b02f853920fa4c8e482b572623309acfb6167b 100644 (file)
@@ -83,8 +83,6 @@ struct memory_location_field {
        const char      *anchor_str;
        const int       value_base;
 };
-extern const struct memory_location_field apei_fields[];
-extern const struct memory_location_field dsm_fields[];
 
 struct page_addr {
        LIST_ENTRY(page_addr)   entry;