From patchwork Wed Jan 9 05:00:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 10753409 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 604F313B4 for ; Wed, 9 Jan 2019 05:02:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42B1928DCD for ; Wed, 9 Jan 2019 05:02:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3530C28DFA; Wed, 9 Jan 2019 05:02:32 +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 CD8AE28DCD for ; Wed, 9 Jan 2019 05:02:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8C4D0211B1F9E; Tue, 8 Jan 2019 21:02:31 -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::344; helo=mail-wm1-x344.google.com; envelope-from=natechancellor@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 00F18211ADA2D for ; Tue, 8 Jan 2019 21:02:29 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id y139so6206106wmc.5 for ; Tue, 08 Jan 2019 21:02:29 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=oaFkg5f6X45Rbbbv3nNt+0yxB8tpFAn+sQnBw93ysb4=; b=Am6rJEKBaZFM1HbNYn9A5WDIOItzy/8cnLPgfIDVDUCkkOVe4ashKPDw0bv7b2K52o M/mlmlr/KMBcikD8Xm71AuKLS+vLkJqIZ5xjbIcozeia5dX3E10yRkZXBhzqHWsVecHV 62E/ysHUE93DumocN7hQelIMNS9//kSOYP8J1uxYgCWzJ5/Gfmkqeq9F7Qh5BOPJAq1e 4gxmMqfxuQqPKndrCU6yVl0/L0xz5uizpn2zysbeu0xrcmOoFojlDVzfHSm3VJp/bcZz 23GmwoVvjCJ4yxiFzj27nadx0L6I6iHK8D+6H4i7KRVgFnM4QG/N0bD9HvrA6ULijvLd Tz2w== 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:mime-version:content-transfer-encoding; bh=oaFkg5f6X45Rbbbv3nNt+0yxB8tpFAn+sQnBw93ysb4=; b=c+ComxWMqDhy96YomEdcm2stDeK9GyzRQ5apc2kkgd5Cyuk5QqwDnJrUjhhc5OL6+0 OPaK0WhQRTfkDlOLdCCYoenxuQblZ0wFZHEbNoZVevWwwjqRMbKQJr1NRuLIIQG6w0pa RRIkGUMX65pvK1W9bN307E78/t2BfqLEBpg6DL4Z19HbR22+yedfGGza1gXOtRTaS3tn AVQiemzXf5OrjUJo9yJPNjqHSvxIotJk6fEVHKEWmOQeVOxNzel8jn9+cAPR/MV5NIvX gLXddescAny6uFm7bTfOjFM6TS4WYWKoQ1ncjY/jzll18rz3MMuF7CRrmdUUjgt8CVHS NnpQ== X-Gm-Message-State: AJcUukfoXPGCuKwXwKECm8WqYnpWTB0Purw3sjRof9kKaVcFHuSy7aeD 1kkW6lHpTY50kbfFgfEEXZE= X-Google-Smtp-Source: ALg8bN4qex/SSicLHCwnayTLTsK9uTmPYTS6BkPnIz3BksuHC1K6BAyhI45pQ218TTQpuY22PpDClA== X-Received: by 2002:a1c:8b44:: with SMTP id n65mr4091472wmd.104.1547010147555; Tue, 08 Jan 2019 21:02:27 -0800 (PST) Received: from localhost.localdomain ([2a01:4f8:10b:24a5::2]) by smtp.gmail.com with ESMTPSA id t199sm323151wmt.1.2019.01.08.21.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 21:02:26 -0800 (PST) From: Nathan Chancellor To: Dan Williams , Ross Zwisler , Vishal Verma , Dave Jiang Subject: [PATCH v2] nfit: Mark some functions as __maybe_unused Date: Tue, 8 Jan 2019 22:00:37 -0700 Message-Id: <20190109050036.17322-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190108045853.5471-1-natechancellor@gmail.com> References: <20190108045853.5471-1-natechancellor@gmail.com> 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. Mark these functions as __maybe_unused because they are only used when CONFIG_X86 is set. Fixes: 4c6926a23b76 ("acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs") Suggested-by: Dan Williams Signed-off-by: Nathan Chancellor --- v1 -> v2: * Mark the functions as __maybe_unused rather than expanding the CONFIG_X86, as requested by Dan. drivers/acpi/nfit/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/nfit/intel.c b/drivers/acpi/nfit/intel.c index 850b2927b4e7..f70de71f79d6 100644 --- a/drivers/acpi/nfit/intel.c +++ b/drivers/acpi/nfit/intel.c @@ -146,7 +146,7 @@ static int intel_security_change_key(struct nvdimm *nvdimm, static void nvdimm_invalidate_cache(void); -static int intel_security_unlock(struct nvdimm *nvdimm, +static int __maybe_unused intel_security_unlock(struct nvdimm *nvdimm, const struct nvdimm_key_data *key_data) { struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); @@ -227,7 +227,7 @@ static int intel_security_disable(struct nvdimm *nvdimm, return 0; } -static int intel_security_erase(struct nvdimm *nvdimm, +static int __maybe_unused intel_security_erase(struct nvdimm *nvdimm, const struct nvdimm_key_data *key, enum nvdimm_passphrase_type ptype) { @@ -276,7 +276,7 @@ static int intel_security_erase(struct nvdimm *nvdimm, return 0; } -static int intel_security_query_overwrite(struct nvdimm *nvdimm) +static int __maybe_unused intel_security_query_overwrite(struct nvdimm *nvdimm) { int rc; struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); @@ -313,7 +313,7 @@ static int intel_security_query_overwrite(struct nvdimm *nvdimm) return 0; } -static int intel_security_overwrite(struct nvdimm *nvdimm, +static int __maybe_unused intel_security_overwrite(struct nvdimm *nvdimm, const struct nvdimm_key_data *nkey) { int rc;