From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130AbdAMPkh (ORCPT ); Fri, 13 Jan 2017 10:40:37 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:60786 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751910AbdAMPkf (ORCPT ); Fri, 13 Jan 2017 10:40:35 -0500 From: Arnd Bergmann To: Michal Marek Cc: linux-kbuild@vger.kernel.org, fengguang.wu@intel.com, kbuild-all@01.org, Arnd Bergmann , stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized Date: Fri, 13 Jan 2017 16:40:01 +0100 Message-Id: <20170113154010.2718601-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <201701131834.BsUjtXaC%fengguang.wu@intel.com> References: <201701131834.BsUjtXaC%fengguang.wu@intel.com> X-Provags-ID: V03:K0:rdYqugfa9wZl3dKY5pqeRvPZ2Lo2HYt56KZDFlgdq/+atRR8wEv ARaoYG3qXdbfM34YIdTDaQxsHvnnDEvHUGl5E2aiJxrf3NzKE28kZ3YI+3hp1UpbchVC8Zi QZJ+siwqfddQx9LlxwJM2UjuXOD1VWGs1nT+Uqzs097/vrdHYy1h4vSlA+K36cFCwkntIb5 CyoC7lwGnJNW2sUs0zbig== X-UI-Out-Filterresults: notjunk:1;V01:K0:sXMKYd7utfQ=:sXG9dtt+SGRIGKcJu4qu1X MZv9WmjyXeVS/ypeoBb47YcD7IM3scgqD6GfROkm3YzkFb1FzfpKm2vj5GnpAblkNeLLfV3ei D3DpKq1UQeqXPwFtG+koP5bCRQ4NrQvOqZfxzWlyHf14HiLOtXPnIjsbAYmbHbQ8knugiPZIS 8A0aYOQja4NwCc/gBMzlS1MPtwpR+/9pQxc53t4fgdWe0RhLUgB6oe/4VVHOrt7KJ2eSAvmSZ m/i3iAraK4P6fNte4YIUNl5N9aerb6sMt2PPrPWaIwpgRmfOE4LHG6QbHS5qLWbH7+FQjkGed 8iUa4vHjxSZUI+vUQpNV+b7uaNv7OAkDt0inKW3wNxBigwlTqkivahulm/Q+PDcI0HgqkPkaR DLXOVmH/GATq6Hd7PXJRTMiWZrhDUFkBkaPXGNFWqPqHIv1EHAA7K9mkLJx5fkKvukI8bolXx aMWI+N2663FxxWbwPv5Xjq0cmi7zuvFsQ7WozucXu9w+SipmsjKHTCFoesKG+fMm2OaNnQ0rd nvE++OE+yQUtp94c9pROrWDsZPrVs/mgf8LtV3f6rIXLPdokgm4thBcwklkc/GqXGf8znqUOt IqveW7F6KQ771zR4PBwCrdCmLmTIYPI+9cfvShxH3Ac3i1iQZGPpsESbsgZ87PwD7u6w3PdNB ILC3KiExHDb8GoG5jd4NH6KcbQ8P2tLfcARp5Wzkui5d6fMRKRG5LtEGs33QKXnel9+o= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@vger.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 Signed-off-by: Arnd Bergmann --- 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