linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"
@ 2017-08-03 10:09 Johannes Thumshirn
  2017-08-24 16:19 ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Thumshirn @ 2017-08-03 10:09 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek
  Cc: linux-kbuild, linux-kernel, Johannes Thumshirn

We have lots of dead defines and macros in drivers, lets offer users a way
to detect and eventually remove them.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 scripts/Makefile.extrawarn | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index fb3522fd8702..8ab8bc91da55 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -25,6 +25,7 @@ warning-1 += -Wold-style-definition
 warning-1 += $(call cc-option, -Wmissing-include-dirs)
 warning-1 += $(call cc-option, -Wunused-but-set-variable)
 warning-1 += $(call cc-option, -Wunused-const-variable)
+warning-1 += $(call cc-option, -Wunused-macros)
 warning-1 += $(call cc-disable-warning, missing-field-initializers)
 warning-1 += $(call cc-disable-warning, sign-compare)
 
-- 
2.12.3


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

* Re: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"
  2017-08-03 10:09 [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1" Johannes Thumshirn
@ 2017-08-24 16:19 ` Masahiro Yamada
  2017-08-28  6:53   ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2017-08-24 16:19 UTC (permalink / raw)
  To: Johannes Thumshirn
  Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List

Hi Johannes,

2017-08-03 19:09 GMT+09:00 Johannes Thumshirn <jthumshirn@suse.de>:
> We have lots of dead defines and macros in drivers, lets offer users a way
> to detect and eventually remove them.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
>  scripts/Makefile.extrawarn | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index fb3522fd8702..8ab8bc91da55 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -25,6 +25,7 @@ warning-1 += -Wold-style-definition
>  warning-1 += $(call cc-option, -Wmissing-include-dirs)
>  warning-1 += $(call cc-option, -Wunused-but-set-variable)
>  warning-1 += $(call cc-option, -Wunused-const-variable)
> +warning-1 += $(call cc-option, -Wunused-macros)
>  warning-1 += $(call cc-disable-warning, missing-field-initializers)
>  warning-1 += $(call cc-disable-warning, sign-compare)


This makes W=1 too noisy.

For example, drivers often define unused register macros
for completeness.  I do not think it is too bad in my opinion.

Perhaps, should it be moved to warning-2 ?






-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"
  2017-08-24 16:19 ` Masahiro Yamada
@ 2017-08-28  6:53   ` Johannes Thumshirn
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2017-08-28  6:53 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List

On Fri, Aug 25, 2017 at 01:19:39AM +0900, Masahiro Yamada wrote:
> This makes W=1 too noisy.
> 
> For example, drivers often define unused register macros
> for completeness.  I do not think it is too bad in my opinion.
> 
> Perhaps, should it be moved to warning-2 ?
> 

Sure, I'll send a v2 in a few days.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

end of thread, other threads:[~2017-08-28  6:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-03 10:09 [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1" Johannes Thumshirn
2017-08-24 16:19 ` Masahiro Yamada
2017-08-28  6:53   ` Johannes Thumshirn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).