From: Jani Nikula <jani.nikula@intel.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y
Date: Mon, 03 Apr 2023 18:41:11 +0300 [thread overview]
Message-ID: <87h6tx0y94.fsf@intel.com> (raw)
In-Reply-To: <CAK7LNARQvR02QQBsbKxWt=CGQzacwJy=tz73ManvQ8fjAMWy+A@mail.gmail.com>
On Sat, 01 Apr 2023, Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Fri, Mar 31, 2023 at 7:15 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> 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 <masahiroy@kernel.org>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> ---
>>
>> 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
>>
>
>
> I do not mind this, but I do not think you need to
> check $(KBUILD_EXTRA_WARN).
Mmh, what if we later add -Werror here? Is the cmd_checkdoc local or
global? Does that impact other places?
BR,
Jani.
>
>
>
> ifdef CONFIG_DRM_I915_WERROR
> cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<
> endif
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-04-03 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 10:15 [Intel-gfx] [PATCH] drm/i915: enable kernel-doc warnings for CONFIG_DRM_I915_WERROR=y Jani Nikula
2023-03-31 10:22 ` Jani Nikula
2023-03-31 15:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-01 4:59 ` [Intel-gfx] [PATCH] " Masahiro Yamada
2023-04-03 15:41 ` Jani Nikula [this message]
2023-04-01 13:46 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6tx0y94.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=masahiroy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.