Skip to contentSkip to conversation

EDAC/ghes: mark some functions __init

PATCH New Miaohe Lin 1 participant 1 message Jun 10, 2023

Subsystems (2)
lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 EDAC/ghes: mark some functions __init

They're only called from __init section. So mark them __init too.

---
 drivers/edac/ghes_edac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/edac/ghes_edac.c +3 -3
index cf2b618c1ada..ea0be56543e5 100644
@@ -200,7 +200,7 @@ static void assign_dmi_dimm_info(struct dimm_info *dimm, struct memdev_dmi_entry
 	dimm->smbios_handle = entry->handle;
 }
 
-static void enumerate_dimms(const struct dmi_header *dh, void *arg)
+static void __init enumerate_dimms(const struct dmi_header *dh, void *arg)
 {
 	struct memdev_dmi_entry *entry = (struct memdev_dmi_entry *)dh;
 	struct ghes_hw_desc *hw = (struct ghes_hw_desc *)arg;
@@ -231,7 +231,7 @@ static void enumerate_dimms(const struct dmi_header *dh, void *arg)
 	hw->num_dimms++;
 }
 
-static void ghes_scan_system(void)
+static void __init ghes_scan_system(void)
 {
 	if (system_scanned)
 		return;
@@ -385,7 +385,7 @@ static struct notifier_block ghes_edac_mem_err_nb = {
 	.priority	= 0,
 };
 
-static int ghes_edac_register(struct device *dev)
+static int __init ghes_edac_register(struct device *dev)
 {
 	bool fake = false;
 	struct mem_ctl_info *mci;
Signature · 1 line
2.27.0