linux-cxl.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Widawsky <ben.widawsky@intel.com>
To: linux-cxl@vger.kernel.org, Dan Williams <dan.j.williams@intel.com>
Cc: Ben Widawsky <ben.widawsky@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Ira Weiny <ira.weiny@intel.com>,
	Jonathan Cameron <Jonathan.Cameron@Huawei.com>,
	Vishal Verma <vishal.l.verma@intel.com>
Subject: [PATCH v2] cxl: Fixed defined but not used warnings
Date: Thu,  2 Sep 2021 10:14:40 -0700	[thread overview]
Message-ID: <20210902171440.2121792-1-ben.widawsky@intel.com> (raw)
In-Reply-To: <20210830171726.2342558-1-ben.widawsky@intel.com>

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 <ben.widawsky@intel.com>
---
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:
-- 
2.33.0


      parent reply	other threads:[~2021-09-02 17:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 17:17 [PATCH 1/3] cxl: Fixed defined but not used warnings Ben Widawsky
2021-08-30 17:17 ` [PATCH 2/3] cxl/core/mbox: Remove extra parameter docs Ben Widawsky
2021-09-01 19:15   ` Dan Williams
2021-09-04  0:39     ` Dan Williams
2021-08-30 17:17 ` [PATCH 3/3] cxl/docs: Remove undocumented references Ben Widawsky
2021-09-01 19:18   ` Dan Williams
2021-09-02 17:09     ` Ben Widawsky
2021-08-30 18:49 ` [PATCH 1/3] cxl: Fixed defined but not used warnings Dan Williams
2021-08-30 19:06   ` Ben Widawsky
2021-09-02 17:14 ` Ben Widawsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210902171440.2121792-1-ben.widawsky@intel.com \
    --to=ben.widawsky@intel.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).