From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110AbdCPOYv (ORCPT ); Thu, 16 Mar 2017 10:24:51 -0400 Received: from mail-ot0-f194.google.com ([74.125.82.194]:36339 "EHLO mail-ot0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbdCPOYe (ORCPT ); Thu, 16 Mar 2017 10:24:34 -0400 MIME-Version: 1.0 In-Reply-To: References: <201701131834.BsUjtXaC%fengguang.wu@intel.com> <20170113154010.2718601-1-arnd@arndb.de> From: Arnd Bergmann Date: Thu, 16 Mar 2017 15:23:58 +0100 X-Google-Sender-Auth: SbP8-zoDY-t4cpGDHh87wBoxxhY Message-ID: Subject: Re: [PATCH] Kbuild: use cc-disable-warning consistently for maybe-uninitialized To: Masahiro Yamada Cc: Michal Marek , Linux Kbuild mailing list , Fengguang Wu , kbuild-all@01.org, stable@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 14, 2017 at 9:52 PM, Arnd Bergmann wrote: > On Tue, Mar 14, 2017 at 5:17 PM, Masahiro Yamada > wrote: >> Hi Arnd, >> >> 2017-01-14 0:40 GMT+09:00 Arnd Bergmann : >>> 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 >> >> >> Applied to linux-kbuild/fixes. Hmm, after I've carried this patch for months, I now found that it caused a build time regression. I'm sending a fix for that too, please either apply the fix on top, or fold it into the first patch. Arnd