From patchwork Thu Sep 2 17:14:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 12472183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 761ECC83026 for ; Thu, 2 Sep 2021 17:14:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49A576108B for ; Thu, 2 Sep 2021 17:14:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234528AbhIBRPq (ORCPT ); Thu, 2 Sep 2021 13:15:46 -0400 Received: from mga12.intel.com ([192.55.52.136]:22211 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbhIBRPp (ORCPT ); Thu, 2 Sep 2021 13:15:45 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10095"; a="198739219" X-IronPort-AV: E=Sophos;i="5.85,262,1624345200"; d="scan'208";a="198739219" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 10:14:46 -0700 X-IronPort-AV: E=Sophos;i="5.85,262,1624345200"; d="scan'208";a="467526623" Received: from kappusam-mobl.amr.corp.intel.com (HELO bad-guy.kumite) ([10.252.143.117]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 10:14:45 -0700 From: Ben Widawsky To: linux-cxl@vger.kernel.org, Dan Williams Cc: Ben Widawsky , Alison Schofield , Ira Weiny , Jonathan Cameron , Vishal Verma Subject: [PATCH v2] cxl: Fixed defined but not used warnings Date: Thu, 2 Sep 2021 10:14:40 -0700 Message-Id: <20210902171440.2121792-1-ben.widawsky@intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210830171726.2342558-1-ben.widawsky@intel.com> References: <20210830171726.2342558-1-ben.widawsky@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org This fixes unused-const-variable warnings emitted by gcc when cxlmem.h is used by pretty much all files except pci.c Signed-off-by: Ben Widawsky --- v2: Replace __maybe_unused with __attribute__((__unused__)) (Dan) --- include/uapi/linux/cxl_mem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index f6e8a005b113..8d206f27bb6d 100644 --- a/include/uapi/linux/cxl_mem.h +++ b/include/uapi/linux/cxl_mem.h @@ -50,7 +50,7 @@ enum { CXL_CMDS }; #define ___C(a, b) { b } static const struct { const char *name; -} cxl_command_names[] = { CXL_CMDS }; +} cxl_command_names[] __attribute__((__unused__)) = { CXL_CMDS }; /* * Here's how this actually breaks out: