From patchwork Thu Sep 16 06:23:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 12498131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65740C433F5 for ; Thu, 16 Sep 2021 06:23:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1750F61207 for ; Thu, 16 Sep 2021 06:23:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1750F61207 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BBB736B0071; Thu, 16 Sep 2021 02:23:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B6B4594000C; Thu, 16 Sep 2021 02:23:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5A2C94000B; Thu, 16 Sep 2021 02:23:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 98DBF6B0071 for ; Thu, 16 Sep 2021 02:23:40 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 52C3118034ABE for ; Thu, 16 Sep 2021 06:23:40 +0000 (UTC) X-FDA: 78592445400.09.382AABA Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf01.hostedemail.com (Postfix) with ESMTP id 002E8505AE72 for ; Thu, 16 Sep 2021 06:23:39 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 30F68611CE; Thu, 16 Sep 2021 06:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631773419; bh=jUOjgA/pqgEKUiSJMHB1W97cBrtZ/aj/ifdF80aUG88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=des2/O1EBnaGhU1MX6s/eikyoHDaUEeMGiBmkJGhQHSmMwuvKGqEibLwdm7HTKoBY m4ZMS/gZfVVaTptewRGoawoyxgKj71OPGGSJBNP4YKxSJMUSe0nHGVYv38TdlFGtfA 2a93FKqD1dBrgIlGg7u4dx4VDunp+t6BsFpI7B4BqH3+6pWmgUt8/bhPfIxv/QDAWf STm/Z0twzrwuHtLveM982iNt6yCEPzEwCr6A0K+sl6FQKNE4FfPJgiOYibv/Q4QI8y sQQmK1l/qSrVbHVanWqRjaVPG0y6nkmG8qxY/iTFJLVlJFkbOEPq652oKuESXH9lRC geqCXkcZnfomw== From: Masami Hiramatsu To: Steven Rostedt Cc: Linus Torvalds , Mike Rapoport , Andrew Morton , LKML , Ingo Molnar , Masami Hiramatsu , Linux-MM , Vlastimil Babka Subject: [PATCH v4 4/4] bootconfig: Rename xbc_destroy_all() to xbc_fini() Date: Thu, 16 Sep 2021 15:23:36 +0900 Message-Id: <163177341667.682366.1520674275752512771.stgit@devnote2> X-Mailer: git-send-email 2.25.1 In-Reply-To: <163177338366.682366.5998343833719057348.stgit@devnote2> References: <163177338366.682366.5998343833719057348.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="des2/O1E"; spf=pass (imf01.hostedemail.com: domain of mhiramat@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=mhiramat@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 002E8505AE72 X-Stat-Signature: ogyf43jg19gzptr36pwfpr3cw87fh3xi X-HE-Tag: 1631773419-376168 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Avoid using this noisy name and use more calm one. This is just a name change. No functional change. Signed-off-by: Masami Hiramatsu --- include/linux/bootconfig.h | 2 +- init/main.c | 2 +- lib/bootconfig.c | 8 ++++---- tools/bootconfig/main.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h index f955bb7eabbb..ba40194a339c 100644 --- a/include/linux/bootconfig.h +++ b/include/linux/bootconfig.h @@ -277,7 +277,7 @@ int __init xbc_init(const char *buf, size_t size, const char **emsg, int *epos); int __init xbc_get_info(int *node_size, size_t *data_size); /* XBC cleanup data structures */ -void __init xbc_destroy_all(void); +void __init xbc_fini(void); /* Debug dump functions */ void __init xbc_debug_dump(void); diff --git a/init/main.c b/init/main.c index 747b4fd38a1a..99a23324d4a1 100644 --- a/init/main.c +++ b/init/main.c @@ -463,7 +463,7 @@ static void __init setup_boot_config(void) static void __init exit_boot_config(void) { - xbc_destroy_all(); + xbc_fini(); } #else /* !CONFIG_BOOT_CONFIG */ diff --git a/lib/bootconfig.c b/lib/bootconfig.c index b088fe5c0001..43a402b02748 100644 --- a/lib/bootconfig.c +++ b/lib/bootconfig.c @@ -802,13 +802,13 @@ static int __init xbc_verify_tree(void) } /** - * xbc_destroy_all() - Clean up all parsed bootconfig + * xbc_fini() - Clean up all parsed bootconfig * * This clears all data structures of parsed bootconfig on memory. * If you need to reuse xbc_init() with new boot config, you can * use this. */ -void __init xbc_destroy_all(void) +void __init xbc_fini(void) { memblock_free_ptr(xbc_data, xbc_data_size); xbc_data = NULL; @@ -869,7 +869,7 @@ int __init xbc_init(const char *data, size_t size, const char **emsg, int *epos) if (!xbc_nodes) { if (emsg) *emsg = "Failed to allocate bootconfig nodes"; - xbc_destroy_all(); + xbc_fini(); return -ENOMEM; } memset(xbc_nodes, 0, sizeof(struct xbc_node) * XBC_NODE_MAX); @@ -925,7 +925,7 @@ int __init xbc_init(const char *data, size_t size, const char **emsg, int *epos) *epos = xbc_err_pos; if (emsg) *emsg = xbc_err_msg; - xbc_destroy_all(); + xbc_fini(); } else ret = xbc_node_num; diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 4f2a8d884745..84808a1871f0 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -397,7 +397,7 @@ static int apply_xbc(const char *path, const char *xbc_path) printf("\tChecksum: %d\n", (unsigned int)csum); /* TODO: Check the options by schema */ - xbc_destroy_all(); + xbc_fini(); free(buf); /* Remove old boot config if exists */