From patchwork Sat Jan 5 08:08:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaochun Lee X-Patchwork-Id: 10749183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 092F714E5 for ; Sat, 5 Jan 2019 08:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0222867F for ; Sat, 5 Jan 2019 08:09:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2E6B2868D; Sat, 5 Jan 2019 08:09:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A93A2867F for ; Sat, 5 Jan 2019 08:09:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7FA8C211AF9DB; Sat, 5 Jan 2019 00:09:17 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=220.181.12.17; helo=m12-17.163.com; envelope-from=lixiaochun.2888@163.com; receiver=linux-nvdimm@lists.01.org Received: from m12-17.163.com (m12-17.163.com [220.181.12.17]) by ml01.01.org (Postfix) with ESMTP id B5C98211A45AB for ; Sat, 5 Jan 2019 00:09:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=adeLbmdf0VDov+wRxu vPHkFwFZM5XNaa1dYaNPTmoKU=; b=dsLtMm0zhjOyfxNpO1OMUJevqHfSUT5zRx Y3oILOtF3Yn5qX1YYfUDHFoarriyDKmc4Sjt5JNgBiYSGHCfdkIeTmWZ4lawgq4A JAztEVTOqchLR4yYZ98OcVzbSX9LlNgKeSXyBuFeqM8l4YZVNCWj21zTwrKxqFzr h8+c4BwG4= Received: from localhost.localdomain.localdomain (unknown [36.102.4.74]) by smtp13 (Coremail) with SMTP id EcCowAAHPHgSZjBcv9QcCQ--.13624S3; Sat, 05 Jan 2019 16:08:55 +0800 (CST) From: Xiaochun Lee To: linux-acpi@vger.kernel.org, linux-nvdimm@lists.01.org Subject: [PATCH] ACPI/nfit: delete the function to_acpi_nfit_desc Date: Sat, 5 Jan 2019 16:08:38 +0800 Message-Id: <1546675718-31174-2-git-send-email-lixiaochun.2888@163.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1546675718-31174-1-git-send-email-lixiaochun.2888@163.com> References: <1546675718-31174-1-git-send-email-lixiaochun.2888@163.com> X-CM-TRANSID: EcCowAAHPHgSZjBcv9QcCQ--.13624S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7Ar47Kw18KFyDuw4rtw1kXwb_yoW8KF15pF 1UKwsrA397GrsI9F4vkw4rXr1ayan7AFyI9rWUX343XFs3Cw1kJFn2kF45JrW8ArWvka13 ZF1vk3WfJF4DArUanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bUAp5UUUUU= X-Originating-IP: [36.102.4.74] X-CM-SenderInfo: 5ol0xtprfk30aosymmi6rwjhhfrp/1tbiQAYzQFSIY0UXywAAsT X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rjw@rjwysocki.net, linux-kernel@vger.kernel.org, Xiaochun Lee , zwisler@kernel.org, lenb@kernel.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Xiaochun Lee The function to_acpi_nfit_desc and function to_acpi_desc do the same things,delete the function to_acpi_nfit_desc, and keep the inline function to_acpi_desc. Signed-off-by: Xiaochun Lee --- drivers/acpi/nfit/core.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 011d3db..8f09410 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -78,12 +78,6 @@ const guid_t *to_nfit_uuid(enum nfit_uuids id) } EXPORT_SYMBOL(to_nfit_uuid); -static struct acpi_nfit_desc *to_acpi_nfit_desc( - struct nvdimm_bus_descriptor *nd_desc) -{ - return container_of(nd_desc, struct acpi_nfit_desc, nd_desc); -} - static struct acpi_device *to_acpi_dev(struct acpi_nfit_desc *acpi_desc) { struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc; @@ -419,7 +413,7 @@ static bool payload_dumpable(struct nvdimm *nvdimm, unsigned int func) int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, unsigned int cmd, void *buf, unsigned int buf_len, int *cmd_rc) { - struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc); + struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); union acpi_object in_obj, in_buf, *out_obj; const struct nd_cmd_desc *desc = NULL; @@ -3367,7 +3361,7 @@ int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *data, acpi_size sz) static int acpi_nfit_flush_probe(struct nvdimm_bus_descriptor *nd_desc) { - struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc); + struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); struct device *dev = acpi_desc->dev; /* Bounce the device lock to flush acpi_nfit_add / acpi_nfit_notify */ @@ -3384,7 +3378,7 @@ static int acpi_nfit_flush_probe(struct nvdimm_bus_descriptor *nd_desc) static int __acpi_nfit_clear_to_send(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm, unsigned int cmd) { - struct acpi_nfit_desc *acpi_desc = to_acpi_nfit_desc(nd_desc); + struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc); if (nvdimm) return 0;