From patchwork Fri Aug 18 04:47:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?R290b3UsIFlhc3Vub3JpL+S6lOWztiDlurfmloc=?= X-Patchwork-Id: 9907593 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A529260382 for ; Fri, 18 Aug 2017 04:48:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9450828C14 for ; Fri, 18 Aug 2017 04:48:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8660928C18; Fri, 18 Aug 2017 04:48:27 +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=-1.9 required=2.0 tests=BAYES_00, 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 144E228C14 for ; Fri, 18 Aug 2017 04:48:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4DAD12095B9EE; Thu, 17 Aug 2017 21:45:32 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mgwym03.jp.fujitsu.com (mgwym03.jp.fujitsu.com [211.128.242.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0457121E79038 for ; Thu, 17 Aug 2017 21:45:30 -0700 (PDT) Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.229.67]) by mgwym03.jp.fujitsu.com with smtp id 548b_77ca_9a603591_4b23_4599_bcff_8955c1c3062d; Fri, 18 Aug 2017 13:47:54 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id 0A4D2AC013F for ; Fri, 18 Aug 2017 13:47:54 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.5.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20170217-enc X-SHieldMailCheckerMailID: 61016158ff0e447aa4b43231eeabb45d Date: Fri, 18 Aug 2017 13:47:51 +0900 From: Yasunori Goto To: NVDIMM-ML Subject: [PATCH 1/3] acpi nfit: move definitions which nfit_test will use In-Reply-To: <20170818134627.8EBC.E1E9C6FF@jp.fujitsu.com> References: <20170818134627.8EBC.E1E9C6FF@jp.fujitsu.com> Message-Id: <20170818134749.8EBF.E1E9C6FF@jp.fujitsu.com> MIME-Version: 1.0 X-Mailer: Becky! ver. 2.73 [ja] X-TM-AS-MML: disable X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP To use nfit_test.ko can use the definition of NFIT_CMD_TRANSLATE_SPA, the defintion is moved from nfit/core.c to ndctl.h. Probably, other NFIT_CMD_XXX defintions will be used by nfit_test.ko in future. move them to ndctl.h at this time. --- drivers/acpi/nfit/core.c | 11 ----------- include/uapi/linux/ndctl.h | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 19182d0..00e49c2 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1621,17 +1621,6 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc) acpi_desc); } -/* - * These constants are private because there are no kernel consumers of - * these commands. - */ -enum nfit_aux_cmds { - NFIT_CMD_TRANSLATE_SPA = 5, - NFIT_CMD_ARS_INJECT_SET = 7, - NFIT_CMD_ARS_INJECT_CLEAR = 8, - NFIT_CMD_ARS_INJECT_GET = 9, -}; - static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc) { struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc; diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 6d3c542..a359d19 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -204,6 +204,17 @@ enum { ND_CMD_CALL = 10, }; +/* + * Though These constants are mainly used by acpi nfit driver, + * they are defined here for nfit_test.ko to be able to use them. + */ +enum nfit_aux_cmds { + NFIT_CMD_TRANSLATE_SPA = 5, + NFIT_CMD_ARS_INJECT_SET = 7, + NFIT_CMD_ARS_INJECT_CLEAR = 8, + NFIT_CMD_ARS_INJECT_GET = 9, +}; + enum { ND_ARS_VOLATILE = 1, ND_ARS_PERSISTENT = 2,