Message ID | 20210902171440.2121792-1-ben.widawsky@intel.com |
---|---|
State | Accepted |
Commit | 9d1b3afd73047d4dd30e3636412c9f9b5def2b14 |
Headers | show |
Series | [v2] cxl: Fixed defined but not used warnings | expand |
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:
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(-)