[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2z8MqRAnSo8A4VEx5=RmoF=FY6vV-9RXVb=2W_asFjgg@mail.gmail.com>
Date: Fri, 27 Jan 2017 17:03:45 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Michal Marek <mmarek@...e.com>
Cc: linux-kbuild@...r.kernel.org, fengguang.wu@...el.com,
kbuild-all@...org, Arnd Bergmann <arnd@...db.de>,
stable@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized
On Fri, Jan 13, 2017 at 4:40 PM, Arnd Bergmann <arnd@...db.de> wrote:
> In commit a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning
> for "make W=1""), I reverted another change that happened to fix a problem
> with old compilers, and now we get this report again with old compilers
> (prior to gcc-4.8) and GCOV enabled:
>
> cc1: warnings being treated as errors
> drivers/gpu/drm/i915/intel_ringbuffer.c: In function 'intel_ring_setup_status_page':
> drivers/gpu/drm/i915/intel_ringbuffer.c:438: error: 'mmio.reg' may be used uninitialized in this function
> At top level:
>>> cc1: error: unrecognized command line option "-Wno-maybe-uninitialized"
>
> The problem is that we turn off the warning conditionally in a number
> of places as we should, but one of them does it unconditionally.
> Instead, change it to call cc-disable-warning as we do elsewhere.
>
> The original patch that caused it was merged into linux-4.7, then
> 4.8 removed the change and 4.9 brought it back, so we probably want
> a backport to 4.9 once this is merged.
>
> Cc: stable@...r.kernel.org
> Fixes: a76bcf557ef4 ("Kbuild: enable -Wmaybe-uninitialized warning for "make W=1"")
> Fixes: e72e2dfe7c16 ("gcov: disable -Wmaybe-uninitialized warning")
> Reported-by: kbuild test robot <fengguang.wu@...el.com>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
Hi Michal,
any plans to pick this up for v4.10?
Arnd
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 4fcc0f2dd93c..dbe9ce5d0e96 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -370,7 +370,7 @@ LDFLAGS_MODULE =
> CFLAGS_KERNEL =
> AFLAGS_KERNEL =
> LDFLAGS_vmlinux =
> -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized
> +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
> CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
>
>
> --
> 2.9.0
>
Powered by blists - more mailing lists