From patchwork Sat Jun 17 08:07:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 109433 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1853167vqr; Sat, 17 Jun 2023 01:31:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DDfUygI2W1jBl2SmpgmDrF/rQr13xZx2PZ3y4jgAsaLG/tDVw1exkMWH/EiKYrBdLuJz9 X-Received: by 2002:a05:620a:24c1:b0:75b:23a0:dec5 with SMTP id m1-20020a05620a24c100b0075b23a0dec5mr4675417qkn.67.1686990688746; Sat, 17 Jun 2023 01:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686990688; cv=none; d=google.com; s=arc-20160816; b=Ff4tJDNBZhuRZRFqF6U+4DMHr6ab9gyyr1RsXyTJc9656mcUqSPEjMhsTSyTmlsMWd FGeqns92ETqGhgvgEADzRUablkzX5z/aNbvkLz+QEXH2/yC+RM+NHTRYwa5gBd1bpeXr JDeYXENkSAznSexO96jWOcl3/0fFsf4FhtZDzOxNSiOkmuBh0cUO2JDb+Z3NHbvafzoA Nl4rE7UjFrFQqM8JPilLPgI/59Hvey/Bzq5oiSYqO3Wp2xR9bdvklAoCJLhgubP6iBMz 1pqd5zNdp8a/O/4YTw3dkSCQ2ZhjmEaNpdzFt+SEqeoyRHE+rVBau0/zFjR4jmrlNg3z d9/g== 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=bnaCYpp5J123Cb9M3vd1oF6mpSSgeNOJ1rInI0d79b8=; b=gnfotABOXRTYgCHaW1ZBam7nOH/yGBg46dJHCbkPsauuft8w2OmeX710Adp1INnvP3 SxPGr7Ew7hqrrmJPE/U7pAJZn1gKH62a6I0DnCQ0uCl5xzcQ0CV0tqxY4+nsFEWie0uV mMt5DrcjW1/swpNOAwn4deugGNwfKYzsviwBTHMMfiVSidYHUIzVZZj+VTQaeJAclJGo no2B+8StKRQgBRxoD2LPr0hYn89yBrNM/ntmqSK5UfRcGJm5jT9cx9n/TD6/Eptsb/1/ EbrI+8oZHA+lYlq5rE+a4nXBKLK+PcJ/RFGb9UUC1fwIlkm4RlmDiHPNZVa0JBYMDey7 uhcw== 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 gq15-20020a17090b104f00b00256a3130dcasi3321968pjb.160.2023.06.17.01.31.13; Sat, 17 Jun 2023 01:31:28 -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 S1346263AbjFQIHq (ORCPT + 99 others); Sat, 17 Jun 2023 04:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjFQIHm (ORCPT ); Sat, 17 Jun 2023 04:07:42 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486472720; Sat, 17 Jun 2023 01:07:40 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QjpXQ0d10zTkrB; Sat, 17 Jun 2023 16:07:02 +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, 17 Jun 2023 16:07:37 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH] ACPI: APEI: mark some functions __init Date: Sat, 17 Jun 2023 16:07:08 +0800 Message-ID: <20230617080708.2002287-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?1768937948069564315?= X-GMAIL-MSGID: =?utf-8?q?1768937948069564315?= hest_esrc_len() and apei_hest_parse() are only called inside __init section. So mark them __init too. Signed-off-by: Miaohe Lin --- drivers/acpi/apei/hest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 6aef1ee5e1bd..2d78e808ab8b 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -55,7 +55,7 @@ static inline bool is_generic_error(struct acpi_hest_header *hest_hdr) hest_hdr->type == ACPI_HEST_TYPE_GENERIC_ERROR_V2; } -static int hest_esrc_len(struct acpi_hest_header *hest_hdr) +static int __init hest_esrc_len(struct acpi_hest_header *hest_hdr) { u16 hest_type = hest_hdr->type; int len; @@ -88,7 +88,7 @@ static int hest_esrc_len(struct acpi_hest_header *hest_hdr) typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data); -static int apei_hest_parse(apei_hest_func_t func, void *data) +static int __init apei_hest_parse(apei_hest_func_t func, void *data) { struct acpi_hest_header *hest_hdr; int i, rc, len;