Message ID | 163072205652.2250120.16833548560832424468.stgit@dwillia2-desk3.amr.corp.intel.com |
---|---|
State | Accepted |
Commit | 9d1b3afd73047d4dd30e3636412c9f9b5def2b14 |
Headers | show |
Series | cxl fixes for v5.15-rc1 | expand |
On Fri, 3 Sep 2021 19:20:56 -0700 Dan Williams <dan.j.williams@intel.com> wrote: > From: Ben Widawsky <ben.widawsky@intel.com> > > Fix 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> > Signed-off-by: Dan Williams <dan.j.williams@intel.com> FWIW another obviously correct one. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.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..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: >
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: