@@ -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;
They're only called from __init section. So mark them __init too. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> --- drivers/edac/ghes_edac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)