From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00DD1C6FD18 for ; Fri, 31 Mar 2023 10:15:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35D7810F13B; Fri, 31 Mar 2023 10:15:48 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id A74E410F13B for ; Fri, 31 Mar 2023 10:15:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680257745; x=1711793745; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=yQAfnKZbGJWaNxgazEhigg5jXR6q5hb5r8PIo0cPtXw=; b=DOXN9RUojNQB3R/h9AUSexWS2/syB77gb3xx67lSR5lHtBkU+YT+Blv2 qgyD2IVTvvRsvgxySTLnDybh3JP8NDp5lSXIrImH31vyz9rlGKVuBgNmP PxqKmYUKHxhWvtpj09wjycdTOH0UpUHD+BvX9K8IcChtEUtnJDHKOa5AC jmWMWsvzs8R+U2YJsP1rJGXQnGgV6rHrlk0iOeIYGAfi6GJFkBrwP0XS9 JBXCo2wMg+HsLzJmhXFzY5rq4zOca/V3f0M0PKxPNq2RkoryPsFUf1xzj tMJ2JyhgtD/fZyyjdeCp0a69RZ27cfk1Q0Jb1WRptW7YTFIk7BabqVSpG A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="343074930" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="343074930" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 03:15:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="808990765" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="808990765" Received: from bachaue1-mobl.ger.corp.intel.com (HELO localhost) ([10.252.41.110]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 03:15:43 -0700 From: Jani Nikula To: intel-gfx@lists.freedesktop.org Date: Fri, 31 Mar 2023 13:15:39 +0300 Message-Id: <20230331101539.2893797-1-jani.nikula@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Transfer-Encoding: 8bit Subject: [Intel-gfx] [PATCH] drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jani.nikula@intel.com, Masahiro Yamada Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Increase awareness of kernel-doc issues by enabling doc check locally when W= is *not* specified on the make command-line, but CONFIG_DRM_I915_WERROR=y is enabled. Once the warnings have been fixed, we can pass -Werror to kernel-doc locally, and fail the build when there are kernel-doc warnings in i915. Cc: Masahiro Yamada Signed-off-by: Jani Nikula --- Masahiro, is this an awful hack to do in our local Makefile? Note that we do try to avoid anyone outside of i915 developers enabling CONFIG_DRM_I915_WERROR=y. Any other and cleaner ways of achieving this, without using W= on the entire kernel? On that note, it would be nice to be able to enable W= on a subdir alone. --- drivers/gpu/drm/i915/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 057ef22fa9c6..13d7040801bf 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -369,6 +369,14 @@ include $(src)/gvt/Makefile obj-$(CONFIG_DRM_I915) += i915.o obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o +# kernel-doc test +# +# Enable locally for CONFIG_DRM_I915_WERROR=y if not already enabled. +# See scripts/Makefile.build +ifeq ($(KBUILD_EXTRA_WARN)$(CONFIG_DRM_I915_WERROR),y) + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< +endif + # header test # exclude some broken headers from the test coverage -- 2.39.2