All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
@ 2020-12-22  2:59 ` Nathan Chancellor
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2020-12-22  2:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Nick Desaulniers, Nicolas Pitre, linux-i3c, linux-kernel,
	clang-built-linux, Nathan Chancellor

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

base-commit: 95393f3e07ab53855b91881692a4a5b52dcdc03c
-- 
2.30.0.rc1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
@ 2020-12-22  2:59 ` Nathan Chancellor
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2020-12-22  2:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Nick Desaulniers, linux-kernel, Nicolas Pitre, clang-built-linux,
	Nathan Chancellor, linux-i3c

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

base-commit: 95393f3e07ab53855b91881692a4a5b52dcdc03c
-- 
2.30.0.rc1


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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
  2020-12-22  2:59 ` Nathan Chancellor
@ 2020-12-22  3:13   ` Nicolas Pitre
  -1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2020-12-22  3:13 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Alexandre Belloni, Nick Desaulniers, linux-i3c, linux-kernel,
	clang-built-linux

On Mon, 21 Dec 2020, Nathan Chancellor wrote:

> 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>

> ---
>  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", },
>  	{},
>  };
> 
> base-commit: 95393f3e07ab53855b91881692a4a5b52dcdc03c
> -- 
> 2.30.0.rc1
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
@ 2020-12-22  3:13   ` Nicolas Pitre
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2020-12-22  3:13 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: clang-built-linux, Alexandre Belloni, Nick Desaulniers,
	linux-i3c, linux-kernel

On Mon, 21 Dec 2020, Nathan Chancellor wrote:

> 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>

> ---
>  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", },
>  	{},
>  };
> 
> base-commit: 95393f3e07ab53855b91881692a4a5b52dcdc03c
> -- 
> 2.30.0.rc1
> 
> 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
  2020-12-22  2:59 ` Nathan Chancellor
@ 2020-12-31 17:42   ` Alexandre Belloni
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2020-12-31 17:42 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Alexandre Belloni, linux-i3c, Nick Desaulniers,
	clang-built-linux, linux-kernel, Nicolas Pitre

On Mon, 21 Dec 2020 19:59:31 -0700, Nathan Chancellor wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
      commit: 291b5c9870fc546376d69cf792b7885cd0c9c1b3

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
@ 2020-12-31 17:42   ` Alexandre Belloni
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandre Belloni @ 2020-12-31 17:42 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Alexandre Belloni, Nick Desaulniers, linux-kernel, Nicolas Pitre,
	clang-built-linux, linux-i3c

On Mon, 21 Dec 2020 19:59:31 -0700, Nathan Chancellor wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
      commit: 291b5c9870fc546376d69cf792b7885cd0c9c1b3

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
  2020-12-31 17:42   ` Alexandre Belloni
@ 2021-02-09  3:59     ` Nathan Chancellor
  -1 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2021-02-09  3:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Nathan Chancellor, Nick Desaulniers, linux-kernel, Nicolas Pitre,
	clang-built-linux, linux-i3c

On Thu, Dec 31, 2020 at 06:42:23PM +0100, Alexandre Belloni wrote:
> On Mon, 21 Dec 2020 19:59:31 -0700, Nathan Chancellor wrote:
> > 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.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
>       commit: 291b5c9870fc546376d69cf792b7885cd0c9c1b3
> 
> Best regards,
> -- 
> Alexandre Belloni <alexandre.belloni@bootlin.com>
> 

Hi Alexandre,

I see as of v5.11-rc7 that this is still an issue even though it has
been applied to the fixes branch. Is it possible for this to make it in
to 5.11 final?

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
@ 2021-02-09  3:59     ` Nathan Chancellor
  0 siblings, 0 replies; 8+ messages in thread
From: Nathan Chancellor @ 2021-02-09  3:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Nick Desaulniers, linux-kernel, Nicolas Pitre, clang-built-linux,
	Nathan Chancellor, linux-i3c

On Thu, Dec 31, 2020 at 06:42:23PM +0100, Alexandre Belloni wrote:
> On Mon, 21 Dec 2020 19:59:31 -0700, Nathan Chancellor wrote:
> > 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.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match
>       commit: 291b5c9870fc546376d69cf792b7885cd0c9c1b3
> 
> Best regards,
> -- 
> Alexandre Belloni <alexandre.belloni@bootlin.com>
> 

Hi Alexandre,

I see as of v5.11-rc7 that this is still an issue even though it has
been applied to the fixes branch. Is it possible for this to make it in
to 5.11 final?

Cheers,
Nathan

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-10 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22  2:59 [PATCH] i3c/master/mipi-i3c-hci: Fix position of __maybe_unused in i3c_hci_of_match Nathan Chancellor
2020-12-22  2:59 ` Nathan Chancellor
2020-12-22  3:13 ` Nicolas Pitre
2020-12-22  3:13   ` Nicolas Pitre
2020-12-31 17:42 ` Alexandre Belloni
2020-12-31 17:42   ` Alexandre Belloni
2021-02-09  3:59   ` Nathan Chancellor
2021-02-09  3:59     ` Nathan Chancellor

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.