linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: torvalds@linux-foundation.org
Cc: akpm@linux-foundation.org, andy.shevchenko@gmail.com,
	arnd@arndb.de, emil.l.velikov@gmail.com, geert@linux-m68k.org,
	keescook@chromium.org, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org, lkp@intel.com,
	mm-commits@vger.kernel.org, rikard.falkeborn@gmail.com,
	syednwaris@gmail.com, vilhelm.gray@gmail.com,
	yamada.masahiro@socionext.com, michal.lkml@markovi.net,
	linux-kbuild@vger.kernel.org
Subject: [PATCH] kbuild: Move -Wtype-limits to W=2
Date: Wed,  8 Jul 2020 21:07:56 +0200	[thread overview]
Message-ID: <20200708190756.16810-1-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <CAHk-=wiKCXEWKJ9dWUimGbrVRo_N2RosESUw8E7m9AEtyZcu=w@mail.gmail.com>

-Wtype-limits is included in -Wextra which is added at W=1. It warns
(among other things) that 'comparison of an unsigned variable `< 0` is
always false. This causes noisy warnings, especially when used in
macros, hence it is more suitable for W=2.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
See also discussion at https://lore.kernel.org/lkml/CAHk-=wiKCXEWKJ9dWUimGbrVRo_N2RosESUw8E7m9AEtyZcu=w@mail.gmail.com/

 scripts/Makefile.extrawarn | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 4aea7cf71d11..62c275685b75 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -35,6 +35,7 @@ KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation)
 # The following turn off the warnings enabled by -Wextra
 KBUILD_CFLAGS += -Wno-missing-field-initializers
 KBUILD_CFLAGS += -Wno-sign-compare
+KBUILD_CFLAGS += -Wno-type-limits
 
 KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1
 
@@ -66,6 +67,7 @@ KBUILD_CFLAGS += -Wshadow
 KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
 KBUILD_CFLAGS += -Wmissing-field-initializers
 KBUILD_CFLAGS += -Wsign-compare
+KBUILD_CFLAGS += -Wtype-limits
 KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized)
 KBUILD_CFLAGS += $(call cc-option, -Wunused-macros)
 
-- 
2.27.0


  reply	other threads:[~2020-07-08 19:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200625202807.b630829d6fa55388148bee7d@linux-foundation.org>
     [not found] ` <20200626032946._LJ_E6G66%akpm@linux-foundation.org>
     [not found]   ` <CAHk-=wiZrhVUq3N17=GVzMQNQUKi65x=-djTM2A+fz8UdQxgEg@mail.gmail.com>
     [not found]     ` <CADRDgG6SXwngT5gS2EY1Y0xnPdYth-FicQyTnPyqiwpmw52eQg@mail.gmail.com>
2020-06-26 13:23       ` [patch 10/32] linux/bits.h: fix unsigned less than zero warnings Andy Shevchenko
2020-06-26 14:03         ` Arnd Bergmann
2020-06-26 14:09           ` Andy Shevchenko
2020-06-26 14:43             ` Arnd Bergmann
2020-06-26 15:21               ` Kees Cook
2020-06-27 22:01           ` Linus Torvalds
2020-07-08 19:07             ` Rikard Falkeborn [this message]
2020-07-08 20:00               ` [PATCH] kbuild: Move -Wtype-limits to W=2 Andy Shevchenko

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=20200708190756.16810-1-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=emil.l.velikov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=keescook@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=michal.lkml@markovi.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=syednwaris@gmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vilhelm.gray@gmail.com \
    --cc=yamada.masahiro@socionext.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 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).