summaryrefslogtreecommitdiffstats
path: root/drivers/i3c
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2020-12-22 03:59:31 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-12-31 18:41:37 +0100
commit291b5c9870fc546376d69cf792b7885cd0c9c1b3 (patch)
tree221f67962af6724a06d528c6edfccd0a5d70e07a /drivers/i3c
parentLinux 5.11-rc1 (diff)
downloadlinux-291b5c9870fc546376d69cf792b7885cd0c9c1b3.tar.xz
linux-291b5c9870fc546376d69cf792b7885cd0c9c1b3.zip
i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
Clang warns: ../drivers/i3c/master/mipi-i3c-hci/core.c:780:21: warning: attribute declaration must precede definition [-Wignored-attributes] static const struct __maybe_unused of_device_id i3c_hci_of_match[] = { ^ ../include/linux/compiler_attributes.h:267:56: note: expanded from macro '__maybe_unused' #define __maybe_unused __attribute__((__unused__)) ^ ../include/linux/mod_devicetable.h:262:8: note: previous definition is here struct of_device_id { ^ 1 warning generated. 'struct of_device_id' should not be split, as it is a type. Move the __maybe_unused attribute after the static and const qualifiers so that there are no warnings about this variable, period. Fixes: 95393f3e07ab ("i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning") Link: https://github.com/ClangBuiltLinux/linux/issues/1221 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Nicolas Pitre <npitre@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201222025931.3043480-1-natechancellor@gmail.com
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/mipi-i3c-hci/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 500abd27fb22..1b73647cc3b1 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -777,7 +777,7 @@ static int i3c_hci_remove(struct platform_device *pdev)
return 0;
}
-static const struct __maybe_unused of_device_id i3c_hci_of_match[] = {
+static const __maybe_unused struct of_device_id i3c_hci_of_match[] = {
{ .compatible = "mipi-i3c-hci", },
{},
};