Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1501202imu; Sat, 5 Jan 2019 00:11:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/UneVk4/2d+v/BFLhhyEHHKqiA/vETuZ700i3GfuupjluyDc36d+IGAd1slB+Uoz4h5YpBr X-Received: by 2002:a62:cf84:: with SMTP id b126mr54801822pfg.98.1546675897956; Sat, 05 Jan 2019 00:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546675897; cv=none; d=google.com; s=arc-20160816; b=i56rdOD2TZ704ERge0WWeM9pbyT5ENzjHpTUHxlEO9MUSrZxS50XUczP8NF/YchLIU oVkwkDgI54Hn1K4MCb2T0VYSoPFGkGso27SnAs2DHWXG4r1vkawQ8z0GAHJ9sgZQo6vW T9oovwxqTNik28EE/mxn4dRNpNH5YYSgwe+PWnt1qdbbN+Fc60eXvkHknig8v2pjMvX7 C7Rd4PT8xwDwHTdTq8k2T7gMRxEKDcjbBHKJ3E4Q8Z4hAwMCHYRduMqryjkGrA6SMU+Z 3oh3vNPOamOpymj3Brp8fgMSRFXHnF3MyG4FfIPbldL8Y+bMH1SzA+Sk8GHGZSwhQ7Bb t9hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=adeLbmdf0VDov+wRxuvPHkFwFZM5XNaa1dYaNPTmoKU=; b=QAa5PIhO771YcfNFx7uNkz7Z4WsrKiAvYkiVH8B19x42fhU9h7LO63T80C4Ei9BFA2 /chtw4l8jUQJ7slKWZwzv7GMBrgw3pEhUx+9blDLEUjuWGt3MdfgoXAkVO9J63hXsN4W Ul54rqhuzRqVlViINZE81Co5p+C+xxb+tOGjZovfGGAovifznxKJK40MQEUoy9MHdqnX pukKJxkv3V8qP2IeJi6qObiFIjsW+Ksss+nIr4yMzPhSKOI4YoPnH8biVye2FKP98vrl Or0ilMB5Ow350GP5H0cNBsy4YEXRLXvm9g7Jg3Qzl6LXCyFEDq3eGwfeWmRP7tou2Ne8 6aqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=dsLtMm0z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si56910258pgc.448.2019.01.05.00.11.22; Sat, 05 Jan 2019 00:11:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=dsLtMm0z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbfAEIJW (ORCPT + 99 others); Sat, 5 Jan 2019 03:09:22 -0500 Received: from m12-17.163.com ([220.181.12.17]:34094 "EHLO m12-17.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfAEIJW (ORCPT ); Sat, 5 Jan 2019 03:09:22 -0500 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 Cc: dan.j.williams@intel.com, zwisler@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com, rjw@rjwysocki.net, lenb@kernel.org, linux-kernel@vger.kernel.org, Xiaochun Lee 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 1.8.3.1