All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Nicolas Pitre <npitre@baylibre.com>
Cc: clang-built-linux@googlegroups.com,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH] i3c/master/mipi-i3c-hci: re-fix __maybe_unused attribute
Date: Wed, 30 Dec 2020 16:42:50 +0100	[thread overview]
Message-ID: <20201230154304.598900-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

clang warns because the added __maybe_unused attribute is in
the wrong place:

drivers/i3c/master/mipi-i3c-hci/core.c:780:21: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
static const struct __maybe_unused of_device_id i3c_hci_of_match[] = {
                    ^
include/linux/compiler_attributes.h:267:56: note: expanded

Fixes: 95393f3e07ab ("i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/i3c/master/mipi-i3c-hci/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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", },
 	{},
 };
-- 
2.29.2


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Nicolas Pitre <npitre@baylibre.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com
Subject: [PATCH] i3c/master/mipi-i3c-hci: re-fix __maybe_unused attribute
Date: Wed, 30 Dec 2020 16:42:50 +0100	[thread overview]
Message-ID: <20201230154304.598900-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

clang warns because the added __maybe_unused attribute is in
the wrong place:

drivers/i3c/master/mipi-i3c-hci/core.c:780:21: error: attribute declaration must precede definition [-Werror,-Wignored-attributes]
static const struct __maybe_unused of_device_id i3c_hci_of_match[] = {
                    ^
include/linux/compiler_attributes.h:267:56: note: expanded

Fixes: 95393f3e07ab ("i3c/master/mipi-i3c-hci: quiet maybe-unused variable warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/i3c/master/mipi-i3c-hci/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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", },
 	{},
 };
-- 
2.29.2


             reply	other threads:[~2020-12-31 17:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 15:42 Arnd Bergmann [this message]
2020-12-30 15:42 ` [PATCH] i3c/master/mipi-i3c-hci: re-fix __maybe_unused attribute Arnd Bergmann
2020-12-30 21:23 ` Nicolas Pitre
2020-12-30 21:23   ` Nicolas Pitre
2020-12-30 21:40   ` Alexandre Belloni
2020-12-30 21:40     ` Alexandre Belloni
2020-12-30 21:43     ` Nathan Chancellor
2020-12-30 21:43       ` Nathan Chancellor
2020-12-30 22:00       ` Alexandre Belloni
2020-12-30 22:00         ` Alexandre Belloni

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=20201230154304.598900-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=boris.brezillon@collabora.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=npitre@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.