From patchwork Sun May 24 09:48:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 6471521 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 02E689F399 for ; Sun, 24 May 2015 09:48:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69A48204A7 for ; Sun, 24 May 2015 09:48:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BE182204A0 for ; Sun, 24 May 2015 09:48:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D1346E32C; Sun, 24 May 2015 02:48:13 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 819426E32C for ; Sun, 24 May 2015 02:48:11 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 24 May 2015 02:48:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,485,1427785200"; d="scan'208";a="699523251" Received: from msourmex-mobl1.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.15.105]) by orsmga001.jf.intel.com with ESMTP; 24 May 2015 02:48:09 -0700 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Sun, 24 May 2015 10:48:07 +0100 Message-Id: <1432460887-31055-1-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.1.0 Cc: Andrew Morton Subject: [Intel-gfx] [PATCH] drm/i915: Make DRM_I915_WERROR depend on !COMPILE_TEST X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With allyesconfig/allmodconfig, kbuild enables all the options it can, including DRM_I915_WERROR. That's not really what we want with -Werror, and this was breaking the build for Andrew. Andrew suggested to use COMPILE_TEST as a way to 'detect' these configurations. An alternative would be to inverse the condition of the option: DRM_I915_NO_WERROR. Setting that one to Y would have no effect, at the price of a bit of confusion. Another alternative would be to introduce a allyesmodconfig_n property to config entries, like the allnoconfig_y one we have today: - "allnoconfig_y" This declares the symbol as one that should have the value y when using "allnoconfig". Used for symbols that hide other symbols. Of course, allyesmodconfig_n would set the value to n when using "allmodconfig" or "allmodconfig". That alternative needs a bit more work though and may not be desirable, given that even allnoconfig_y is used only once today. Reported-by: Andrew Morton Suggested-by: Andrew Morton Cc: Andrew Morton Cc: Chris Wilson Signed-off-by: Damien Lespiau Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index 070a035..9d6ec64 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -1,5 +1,8 @@ config DRM_I915_WERROR bool "Force GCC to throw an error instead of a warning when compiling" + # We use the dependency on !COMPILE_TEST to not be enabled in + # allmodconfig or allyesconfig configurations + depends on !COMPILE_TEST default n ---help--- Add -Werror to the build flags for (and only for) i915.ko