Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28822745rwd; Wed, 5 Jul 2023 03:18:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ljwSHrjp5Kzojcet8J0Qnq2FsTj9OWpBQ6mWdg5GCv9v7c1b44YgpGlMc88Le0EGdQizw X-Received: by 2002:a05:6a20:4c23:b0:122:20c:fbb3 with SMTP id fm35-20020a056a204c2300b00122020cfbb3mr15732121pzb.39.1688552304885; Wed, 05 Jul 2023 03:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688552304; cv=none; d=google.com; s=arc-20160816; b=qIofUrlScaKca6JkdyIFCsgcqEcAK/P3PN7Lm7VfP249g5TekX+yeAnRw0pj77EYeh YmcKO1+gzp4Tzaa8UyI473nOHPDnPrOC1rWEGFEVfdMph2TC9V1+K+k/esu86rzTgDMn eFNXwHT5xL2gLql+sc2MuAJblLrJL4R+8I+zbLd09EJe2dghR1WTmXLsMTY3K8AH3XTh ZMKK+5IbvHY/4SLu+drr4xvro0VB2sN54S8SIhHv3GQ9p0JfCVW5M0fvz4GyOS89VR9E tiCFkCIXQ3yXyn10qh770iAdDAnRebVX21DhZc4fpFMBsdpzzsgl0HLHysbzLCgUuTmE Oh7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:organization :subject:cc:to:from:dkim-signature; bh=X8vZ6k9Qy8CPIjpIycZfUP6Td90myZfSFwL43NJ0594=; fh=/kYm2dZV4S2IDC59OmZyOZZYxcQrM4RqQ4+ARBTIcP4=; b=XO6+C1qvrOmnwApn9rpEsHaOxjAOLssnMyhgb3I+0/40/skXEFQLt7mNROQqbDy8Pa 0UvFJZw10TKam/1Ep0G7aZuqvJpl3Sae8xiK18Hn/kHJ6JYtotSR4n8nXqBmOxHKugRJ jiFXz7Bs/5NKNJYVjQ1I6p0VbV9QfgWiV1Z6qHoBvQvTh+U35besNpNAw+aSlbTjYRhP zPmWnESyiW8hHnIcwo1kNq4HVhU5+YOun9B7QL378+jVjcqusKSsnPbBn6FRnlLwfE2P Fszz1A16+LuYjCf2QUNCsW03KV3Arm+9AgnvCF8lszKc9PeUC8mgGVfOibzyFnCPebZ5 HmFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KzkIdcMs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x37-20020a056a000be500b00659af029c39si18815825pfu.90.2023.07.05.03.18.12; Wed, 05 Jul 2023 03:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KzkIdcMs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232103AbjGEJyu (ORCPT + 99 others); Wed, 5 Jul 2023 05:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjGEJyn (ORCPT ); Wed, 5 Jul 2023 05:54:43 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68521731; Wed, 5 Jul 2023 02:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688550881; x=1720086881; h=from:to:cc:subject:date:message-id:mime-version; bh=gZs5puT8XIu8UqezpunPVtrS+rhk5K8cygXvP7LrZZk=; b=KzkIdcMsKq9qUmvu0CKLJtUTtGPRo1+lbyeXzFojPjyjBKupy/oaWXl2 NrMUW0ZEHZGLI2zU+e22stONqKof3dG2x11v7qNVeOLkqji5DJwLwjQXB nthWsNfHEmWgE+dMNxsVG3OKfYfo+qYJiEZfziNxPXXrRJJLcZJ/LniMK 3vrrbxeGXo353pDgMAyb6CADod6SDldKJlUq1P8wnCZ2uT4uBLwyjzFEE 1BivjxZ3KVJLvsjD0X43lSLhGo1vDIl54yUOIR6K5dhKpBSLWsri1oU5F jGR2oY4mvsidaV34OPeYuAtPcJFzlMxcNiw7358dvTs9zf/dNFN7UmRou Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="360774836" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="360774836" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 02:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="719166445" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="719166445" Received: from unisar-mobl.ger.corp.intel.com (HELO localhost) ([10.252.49.23]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 02:54:37 -0700 From: Jani Nikula To: linux-kernel@vger.kernel.org, workflows@vger.kernel.org, linux-kbuild@vger.kernel.org, intel-gfx@lists.freedesktop.org Cc: Linus Torvalds , Rodrigo Vivi , Tvrtko Ursulin , Joonas Lahtinen , Masahiro Yamada Subject: __diag_ignore_all(), GCC < 8, extra warnings, and -Werror Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Date: Wed, 05 Jul 2023 12:54:35 +0300 Message-ID: <87wmzezns4.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For a long time now, i915 has enabled a bunch of W=1 style warnings locally, and we try hard to keep i915 warning free. One of the warnings is -Woverride-init from -Wextra. We need to bypass that in a few cases, and used to do this for the relevant files: CFLAGS_file.o = $(call cc-disable-warning, override-init) Recently, we switched from the above to a more localized version in each file.c: __diag_push(); __diag_ignore_all("-Woverride-init", "Allow overriding inherited members"); ... __diag_pop(); We now got a report that this fails the build with CONFIG_WERROR=y or W=e when using GCC version < 8. Indeed, __diag_ignore_all() requires GCC version 8 or later. Should we now revert back to disabling -Woverride-init on a file granularity? Should we consider breaking the build for CONFIG_WERROR=y or W=e on older compilers a regression? I'll note that with the current usage of __diag_ignore_all() elsewhere in kernel, CONFIG_WERROR=y or W=e with W=1 will never pass on older compilers. But then again, it has never passed on any compiler, so it can't be a regression. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center