From: Ben Widawsky Date: Sat, 4 Sep 2021 02:20:56 +0000 (-0700) Subject: cxl/uapi: Fix defined but not used warnings X-Git-Tag: v5.15~315^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d1b3afd73047d4dd30e3636412c9f9b5def2b14;p=platform%2Fkernel%2Flinux-starfive.git cxl/uapi: Fix defined but not used warnings 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 Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/163072205652.2250120.16833548560832424468.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams --- diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h index f6e8a00..8d206f2 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: