[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXy2aH6nsZZr2qpqi83S=6_bXEk+qk3RKcDzOcvU13Z1A@mail.gmail.com>
Date: Tue, 28 May 2024 15:01:00 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Arnd Bergmann <arnd@...db.de>,
Masahiro Yamada <masahiroy@...nel.org>, Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas@...sle.eu>, Kees Cook <keescook@...omium.org>, linux-kbuild@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] [v3] kbuild: turn on -Wrestrict by default
Hi Arnd,
On Mon, Apr 15, 2024 at 2:22 PM Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> All known -Wrestrict warnings are addressed now, so don't disable the warning
> any more.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Thanks for your patch, which is now commit 06bb7fc0feee32d9 ("kbuild:
turn on -Wrestrict by default") in v6.10-rc1.
With shmobile_defconfig and gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04):
kernel/kallsyms.c: In function ‘__sprint_symbol.constprop’:
kernel/kallsyms.c:492:17: warning: ‘strcpy’ source argument is the
same as destination [-Werror=restrict]
492 | strcpy(buffer, name);
| ^~~~~~~~~~~~~~~~~~~~
Reverting the commit fixes the issue.
I assume you just forgot that this depends on "[PATCH] [v5] kallsyms:
rework symbol lookup return codes"?
https://lore.kernel.org/r/20240404143424.3279752-1-arnd@kernel.org
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -98,7 +98,6 @@ else
> # Suppress them by using -Wno... except for W=1.
> KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
> KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable)
> -KBUILD_CFLAGS += $(call cc-disable-warning, restrict)
> KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
> KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
> KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists