From patchwork Mon Sep 10 06:21:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ocean He X-Patchwork-Id: 10593581 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 1B12D14DB for ; Mon, 10 Sep 2018 06:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08D1328C91 for ; Mon, 10 Sep 2018 06:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0DC528E82; Mon, 10 Sep 2018 06:24:06 +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.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID 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 AD3D228C91 for ; Mon, 10 Sep 2018 06:24:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 93E7B21122927; Sun, 9 Sep 2018 23:24:06 -0700 (PDT) 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=2607:f8b0:4864:20::644; helo=mail-pl1-x644.google.com; envelope-from=oceanhehy@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8146221962301 for ; Sun, 9 Sep 2018 23:24:05 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id ba4-v6so9235890plb.11 for ; Sun, 09 Sep 2018 23:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fHMI+xukBON89nXvZYMkVDi6OYKOCbycFLQGiP1LgNU=; b=lGkWmsODnzacGztU7q5LQsZn9aKq550tNmkWbHvANLe/cPvSn9JsM+U0OsudZB3jgr dFJgZvfOtiWdG+qfQO9a0A73ZS5/MrhBIAZO5jbEN+wzHdZtU5M5vpIWkL4216SFgM9+ TgB9zJPwM59H7umPCG1Miv4gIcbk5QKm3BwWOQNjradVbXmT+AvPGA/13XxeEyvW8oCT 5jMHRJMjc6haZgZWXmC24yslELdcZi1Xveh/ixjFjjEE6gQeIYbZwNgS4KIyx8fWBNFA tkU+17DcXdpGKIcY54LPGkchRYlET0aUghZ2zkab6A3v4XIJIqM1v5HYzx8xC+nqqdWu A+YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fHMI+xukBON89nXvZYMkVDi6OYKOCbycFLQGiP1LgNU=; b=CfmjCcAEUB73YarUZq7woGQiLHlaNjJ/w9hTAUpia+ra5HvlPydgjVwOKSVSPuWQGB EyZ7fpbL6+ueG+oBaNbsVjkBeGTpdyR77AR0XC0J9Qw2slWPaqJDEzq0+oOyiIjtX+ci 8ZtduQXWox+XdPP0WHZuFHCgyTnyLSAjv3ZrPnOZo5mCSkvOb+623NPIiv0pkeD+F+Xu N9zE4V22Vt0SRPnVuuTARzgQm5T4JOX1w+vPH1yzn3htd0VcHK5cjd8juP74xZsLo8hD fPaEtu8d9GOsb+4IqAbfWHn8cepi+Bn/7pc04Vzct/chTesJZZ7ZExFe5YtJMLXzM1Yj 7WlA== X-Gm-Message-State: APzg51APrTzAoM/4qKjzA0LhYEkVbK1kRZspgGjlUBfQhXO1D86QhyD4 ee9rxpzPpMOFCSYgYe+xgVzJYdVc X-Google-Smtp-Source: ANB0Vdanr0ZwDB8k65v4PQhQy8gJsV9jqtnA3Sd3QYhkEBBGczdUB0dsPKlLfwWmhas7whwGT8Q2Pg== X-Received: by 2002:a17:902:561:: with SMTP id 88-v6mr20030244plf.320.1536560645127; Sun, 09 Sep 2018 23:24:05 -0700 (PDT) Received: from localhost.localdomain ([104.237.86.186]) by smtp.gmail.com with ESMTPSA id e190-v6sm29884955pfc.81.2018.09.09.23.24.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 23:24:04 -0700 (PDT) From: Ocean He To: dan.j.williams@intel.com, zwisler@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com Subject: [PATCH 1/3] libnvdimm, claim: remove static attribute of nd_detach_and_reset Date: Mon, 10 Sep 2018 02:21:46 -0400 Message-Id: <1536560508-24564-2-git-send-email-oceanhehy@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1536560508-24564-1-git-send-email-oceanhehy@gmail.com> References: <1536560508-24564-1-git-send-email-oceanhehy@gmail.com> 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: Ocean He , linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Ocean He The function nd_detach_and_reset needs to be called externally, so remove the static attribute and declare it in nd-core.h. Signed-off-by: Ocean He --- drivers/nvdimm/claim.c | 2 +- drivers/nvdimm/nd-core.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c index fb667bf..46e56ecf 100644 --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -117,7 +117,7 @@ struct nd_pfn *to_nd_pfn_safe(struct device *dev) return NULL; } -static void nd_detach_and_reset(struct device *dev, +void nd_detach_and_reset(struct device *dev, struct nd_namespace_common **_ndns) { /* detach the namespace and destroy / reset the device */ diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index ac68072..7fd74d0 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h @@ -123,6 +123,7 @@ struct resource *nsblk_add_resource(struct nd_region *nd_region, resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns); void nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); void __nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); +void nd_detach_and_reset(struct device *dev, struct nd_namespace_common **_ndns); bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, struct nd_namespace_common **_ndns); bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,