From patchwork Sat Jun 10 03:52:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 105897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1376855vqr; Fri, 9 Jun 2023 23:17:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ468bf87H4dmdvFpRNwvRFebl3RFm7qDxnFZlLjGgulsOuQWDNIHGXpRGIakiZobn1Mqj7R X-Received: by 2002:a17:902:da90:b0:1a9:8d57:6d6c with SMTP id j16-20020a170902da9000b001a98d576d6cmr1188740plx.24.1686377835019; Fri, 09 Jun 2023 23:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686377835; cv=none; d=google.com; s=arc-20160816; b=m8VrQcE3HBANckqP1pKBR0AkNRhMTHNW+jvln6Ld+ve2hzbJKWBRWK8ReBEnkyj7cm V4OTlc8ERnsokvF8v2myPVUlztW9HgpmtVrigT4SG6zMaeRdoowZAd8JO1NyiTN2NOPL dsvHFLXgYdpdJx/EcIKR8HQfGlMYQuWtWQj2+WZC3V4c5ghAyd/Oi6me7GXvCJ03ac+c o6iLlrayjIrBVJch8SRGkAZF5mnbPHDtBK8pQ7Gp0YZjHaV39b8AfA+FJpWWjc0enO6k rhfNfyCjrA5Ge4dkTL74uhvAsSkotoEnLeAEKS+la29/ovlKHWCPj70IhYAuTIt6e4kf wfuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wzOTYSwfk7Iln5Zb+LA3RVK8Fntu47mJE+89x1W7gdU=; b=IepcnXsIfG6XT+QSLFORIUoQmGrmjlB6TJZ5d7tDglhfgDNq4WrQv3SU9wPS0GKc8b lPhlqwwDFm8S1cD6kxDuQ73Eb0A0Rc1ijkegN8B13Wl9cNQjDi0BOgE04baU22EZPuPc JF2UCJGCr8ZfKjt6V9Vi4LMNe59pmHzzhI/X5Srv7llreWbKnLBlI34hxhMYu9X+yH28 L8516+X5UnHUKUxL7S4VfQE9C7HciAduSKhvys9K7TqKw5E8jM6m66u1D7d/LlgcW0Rm i/cQTxKT06bctad4UCeZmfme85qOGVS8ofpdXXiUePqvn5pp1E0OS7dhVn5UGcsXw+9I cTCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kt3-20020a170903088300b001a699fc81e8si3785317plb.98.2023.06.09.23.16.58; Fri, 09 Jun 2023 23:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbjFJDxh (ORCPT + 99 others); Fri, 9 Jun 2023 23:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234069AbjFJDw6 (ORCPT ); Fri, 9 Jun 2023 23:52:58 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EDCB3C19; Fri, 9 Jun 2023 20:52:56 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QdPBN23tYzLmlc; Sat, 10 Jun 2023 11:51:08 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 10 Jun 2023 11:52:53 +0800 From: Miaohe Lin To: , , CC: , , , , Subject: [PATCH] EDAC/ghes: mark some functions __init Date: Sat, 10 Jun 2023 11:52:37 +0800 Message-ID: <20230610035237.1017638-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768295324270218449?= X-GMAIL-MSGID: =?utf-8?q?1768295324270218449?= They're only called from __init section. So mark them __init too. Signed-off-by: Miaohe Lin --- 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;