lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230610035237.1017638-1-linmiaohe@huawei.com>
Date:   Sat, 10 Jun 2023 11:52:37 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     <mchehab@...nel.org>, <bp@...en8.de>, <tony.luck@...el.com>
CC:     <james.morse@....com>, <rric@...nel.org>,
        <linux-edac@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linmiaohe@...wei.com>
Subject: [PATCH] EDAC/ghes: mark some functions __init

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

Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
 drivers/edac/ghes_edac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index cf2b618c1ada..ea0be56543e5 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -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;
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ