From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431AbcBOOf2 (ORCPT ); Mon, 15 Feb 2016 09:35:28 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:47449 "EHLO e06smtp15.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298AbcBOOf0 (ORCPT ); Mon, 15 Feb 2016 09:35:26 -0500 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: oberpar@linux.vnet.ibm.com X-IBM-RcptTo: linux-kbuild@vger.kernel.org;linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] gcov: disable -Wmaybe-uninitialized warning To: Arnd Bergmann , Michal Marek References: <1455293187-179811-1-git-send-email-arnd@arndb.de> <1455293187-179811-6-git-send-email-arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org From: Peter Oberparleiter Message-ID: <56C1E229.4050308@linux.vnet.ibm.com> Date: Mon, 15 Feb 2016 15:35:21 +0100 MIME-Version: 1.0 In-Reply-To: <1455293187-179811-6-git-send-email-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16021514-0021-0000-0000-0000202BA073 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12.02.2016 17:06, Arnd Bergmann wrote: > When gcov profiling is enabled, we see a lot of spurious warnings about > possibly uninitialized variables being used: > > arch/arm/mm/dma-mapping.c: In function 'arm_coherent_iommu_map_page': > arch/arm/mm/dma-mapping.c:1085:16: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] > drivers/clk/st/clk-flexgen.c: In function 'st_of_flexgen_setup': > drivers/clk/st/clk-flexgen.c:323:9: warning: 'num_parents' may be used uninitialized in this function [-Wmaybe-uninitialized] > kernel/cgroup.c: In function 'cgroup_mount': > kernel/cgroup.c:2119:11: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized] > > All of these are false positives, so it seems better to just disable > the warnings whenever GCOV is enabled. Most users don't enable GCOV, > and based on a prior patch, it is now also disabled for 'allmodconfig' > builds, so there should be no downsides of doing this. > > Signed-off-by: Arnd Bergmann Sounds sane. Acked-by: Peter Oberparleiter > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 6bb89728a9d1..7b6900931a47 100644 > --- a/Makefile > +++ b/Makefile > @@ -364,7 +364,7 @@ AFLAGS_MODULE = > LDFLAGS_MODULE = > CFLAGS_KERNEL = > AFLAGS_KERNEL = > -CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im > +CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im -Wno-maybe-uninitialized > CFLAGS_KCOV = -fsanitize-coverage=trace-pc > > -- Peter Oberparleiter Linux on z Systems Development - IBM Germany