From: Ben Widawsky <ben.widawsky@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-cxl@vger.kernel.org,
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: Re: [PATCH 1/3] cxl: Fixed defined but not used warnings
Date: Mon, 30 Aug 2021 12:06:13 -0700 [thread overview]
Message-ID: <20210830190613.2zn47o4d44p3ud5k@intel.com> (raw)
In-Reply-To: <CAPcyv4grX3ppzs9gO991s56pbMokU-G75gkV2y+9Cv8ET7d2Xw@mail.gmail.com>
On 21-08-30 11:49:05, Dan Williams wrote:
> On Mon, Aug 30, 2021 at 10:17 AM Ben Widawsky <ben.widawsky@intel.com> wrote:
> >
> > 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>
> > ---
> > 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..1236dd9ffe23 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[] __maybe_unused = { CXL_CMDS };
>
> Since this is a uapi header does this need to be the raw
> "__attribute__((__unused__))"?
Good catch. I grepped uapi dir and interestingly didn't find other examples of
unused... Feeling a bit special snowflake now.
next prev parent reply other threads:[~2021-08-30 19:06 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 [this message]
2021-09-02 17:14 ` [PATCH v2] " Ben Widawsky
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=20210830190613.2zn47o4d44p3ud5k@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).