From patchwork Tue Jan 8 04:58:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10751405 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 11A3C91E for ; Tue, 8 Jan 2019 04:59:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0E928AD5 for ; Tue, 8 Jan 2019 04:59:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC90928AF5; Tue, 8 Jan 2019 04:59: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_ADSP_CUSTOM_MED, 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 79FE828AD5 for ; Tue, 8 Jan 2019 04:59:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 48C5C211B15A8; Mon, 7 Jan 2019 20:59: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=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=natechancellor@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 174DB211A3216 for ; Mon, 7 Jan 2019 20:59:14 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id u4so2703624wrp.3 for ; Mon, 07 Jan 2019 20:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=hlWw0voukglhdooGQz/SxyLb0Z75gM5J6LEq6IH1cuE=; b=oALU/CExrpuSqA0/Z/YDes/IUFd5Tpy9nt2W4Tpj0Cjz62o1esVW0SaSRX4VPJ4tQr lYf/MZGNX21t0nv1p9suxcJesJe74nalGniz2hMtPfFJ9Mktt7QJPy3YlyFuUI2pKWwW CPOep5XpS33FxvdAEiH6Wb0bQJ6m7/xStSInnJMP0/6WJwrIp9N9uLVzfoH+yAliGgZe vUt0VUJPR482J/a4cPhPt23GFBRHR3TutiZ5hlFDte7rd8q9yl9lKnldkWMpdSG/4QI4 rlV3LkiRx6iX9UY3gaTEUTm36nXmHg1w4pOijBBspRzPddS5sEHQH+iybXzE+VJMkapm N4lg== 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:mime-version :content-transfer-encoding; bh=hlWw0voukglhdooGQz/SxyLb0Z75gM5J6LEq6IH1cuE=; b=flNZgnh30c+xsRWu/XY10jPoxO58gqiJyV7cxkg24SYLjrN2P0RuS9e7jdWf7tmvqm Z+dSjl2gojxVmVfmBrVXeRAwsPk/xsuoDtycLjBEbqIwOPExwCL4O3g5AaR6pPDcXdOp zMExUNF8FCYP2+ueFpcF4bTxacxfH2ZX2hGZYwJk1BiFdStcRCneF13VdEe+gZa6bz3w J9TxE6DdhY08deSj89Gmtp44wGJqNRlRbeHmT4yaqJSyZb6gWWth1FT1uFrCld28d2FY evkKpo8yJmY6EPmFSBmdce+V877PYFqbjo//W0+TIBfL4emm1gpOGthbfyeQjUJ6BBDH wGpA== X-Gm-Message-State: AJcUukfJ67evDk3Urmitb0SDNlX6UqV0RyWa1f4oPVhMOJllY9BhwuOF YAOQpyMLTT7KERVSSBD6BI0= X-Google-Smtp-Source: ALg8bN5aJUxWXQsn9ZUmRPp9NxxUMR+MmA1OMQ7B911iG/jDjDk6Z1I/J8i7dtrIdfrV6iqJh6wmaA== X-Received: by 2002:adf:be8b:: with SMTP id i11mr214953wrh.235.1546923553035; Mon, 07 Jan 2019 20:59:13 -0800 (PST) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id i13sm51827837wrw.32.2019.01.07.20.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Jan 2019 20:59:11 -0800 (PST) From: Nathan Chancellor To: Dan Williams , Ross Zwisler , Vishal Verma , Dave Jiang Subject: [PATCH] nfit: Hide unused functions behind CONFIG_X86 Date: Mon, 7 Jan 2019 21:58:53 -0700 Message-Id: <20190108045853.5471-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Patchwork-Bot: notify 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: linux-nvdimm@lists.01.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Nathan Chancellor , Len Brown Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP On arm64 little endian allyesconfig: drivers/acpi/nfit/intel.c:149:12: warning: unused function 'intel_security_unlock' [-Wunused-function] static int intel_security_unlock(struct nvdimm *nvdimm, ^ drivers/acpi/nfit/intel.c:230:12: warning: unused function 'intel_security_erase' [-Wunused-function] static int intel_security_erase(struct nvdimm *nvdimm, ^ drivers/acpi/nfit/intel.c:279:12: warning: unused function 'intel_security_query_overwrite' [-Wunused-function] static int intel_security_query_overwrite(struct nvdimm *nvdimm) ^ drivers/acpi/nfit/intel.c:316:12: warning: unused function 'intel_security_overwrite' [-Wunused-function] static int intel_security_overwrite(struct nvdimm *nvdimm, ^ 4 warnings generated. These functions are only used in __intel_security_ops when CONFIG_X86 is set so only define these functions under that same condition. Fixes: 4c6926a23b76 ("acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs") Signed-off-by: Nathan Chancellor --- drivers/acpi/nfit/intel.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/nfit/intel.c b/drivers/acpi/nfit/intel.c index 850b2927b4e7..2ba0f1543940 100644 --- a/drivers/acpi/nfit/intel.c +++ b/drivers/acpi/nfit/intel.c @@ -144,6 +144,7 @@ static int intel_security_change_key(struct nvdimm *nvdimm, } } +#ifdef CONFIG_X86 static void nvdimm_invalidate_cache(void); static int intel_security_unlock(struct nvdimm *nvdimm, @@ -186,6 +187,7 @@ static int intel_security_unlock(struct nvdimm *nvdimm, return 0; } +#endif static int intel_security_disable(struct nvdimm *nvdimm, const struct nvdimm_key_data *key_data) @@ -227,6 +229,7 @@ static int intel_security_disable(struct nvdimm *nvdimm, return 0; } +#ifdef CONFIG_X86 static int intel_security_erase(struct nvdimm *nvdimm, const struct nvdimm_key_data *key, enum nvdimm_passphrase_type ptype) @@ -360,16 +363,10 @@ static int intel_security_overwrite(struct nvdimm *nvdimm, * TODO: define a cross arch wbinvd equivalent when/if * NVDIMM_FAMILY_INTEL command support arrives on another arch. */ -#ifdef CONFIG_X86 static void nvdimm_invalidate_cache(void) { wbinvd_on_all_cpus(); } -#else -static void nvdimm_invalidate_cache(void) -{ - WARN_ON_ONCE("cache invalidation required after unlock\n"); -} #endif static const struct nvdimm_security_ops __intel_security_ops = {