Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719392 > unrolled thread

Re: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2017-08-24 18:30 +0200
Last post2017-08-24 18:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1" Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-08-24 18:30 +0200

#1719392 — Re: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2017-08-24 18:30 +0200
SubjectRe: [PATCH] Kbuild: enable -Wunused-macros warning for "make W=1"
Message-ID<ui3b4-tc-37@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web