intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, simona.vetter@ffwll.ch,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 2/2] drm: ensure drm headers are self-contained and pass kernel-doc
Date: Mon, 03 Mar 2025 15:52:57 +0200	[thread overview]
Message-ID: <8734fu1arq.fsf@intel.com> (raw)
In-Reply-To: <CAK7LNARYBtpwkJxbf84+bzBYn05Kk2zvdVLDZMMBg=B_zzFokg@mail.gmail.com>

On Mon, 03 Mar 2025, Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Mon, Mar 3, 2025 at 7:02 PM Jani Nikula <jani.nikula@intel.com> wrote:
>>
>> On Mon, 03 Mar 2025, Masahiro Yamada <masahiroy@kernel.org> wrote:
>> And one of the underlying goals is to make for minimal headers with
>> minimal includes and minimal dependencies, preferring forward
>> declarations over includes, splitting functionality by header, etc. It's
>> just that doing that often leads to broken headers, unless you actually
>> build test them... and here we are.
>
>
> What I learned from my last attempt is that we cannot avoid
> false positives without adding a lot of exceptions.

All of the drm core, xe and i915 headers build fine without
exceptions. There are no false positives. (*)

> We can never be certain whether you are making DRM headers
> self-contained for valid reasons or for hypothetical, invalid ones.

Please enlighten me. What are hypothetical, invalid reasons for making
headers self-contained?

IMO headers should almost invariably be self-contained, instead of
putting the burden on their users to include other headers to make it
work. It's a PITA in a project the size of the kernel, or even just the
drm subsystem, to track these cases when you modify includes in either
users or the headers being included.

The exception to this are headers that are not to be included directly
by users, but rather by other headers as an implementation detail. There
may be such cases in include/linux, but not under include/drm.


BR,
Jani.


(*) Fine, there's one *intentional* special case in i915.

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-03-03 13:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 14:41 [PATCH 0/2] drm: add header tests Jani Nikula
2025-01-22 14:41 ` [PATCH 1/2] drm/client: include types.h to make drm_client_event.h self-contained Jani Nikula
2025-01-22 14:41 ` [PATCH 2/2] drm: ensure drm headers are self-contained and pass kernel-doc Jani Nikula
2025-03-02 16:01   ` Masahiro Yamada
2025-03-03 10:02     ` Jani Nikula
2025-03-03 12:59       ` Masahiro Yamada
2025-03-03 13:52         ` Jani Nikula [this message]
2025-03-04 18:05           ` Masahiro Yamada
2025-03-05 13:59             ` Maxime Ripard
2025-03-08 17:05               ` Masahiro Yamada
2025-03-13 10:59                 ` Jani Nikula
2025-01-22 14:54 ` ✓ CI.Patch_applied: success for drm: add header tests Patchwork
2025-01-22 14:54 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-22 14:55 ` ✓ CI.KUnit: success " Patchwork
2025-01-22 15:12 ` ✓ CI.Build: " Patchwork
2025-01-22 15:14 ` ✓ CI.Hooks: " Patchwork
2025-01-22 15:16 ` ✗ CI.checksparse: warning " Patchwork
2025-01-22 15:44 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-23  3:20 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-23 14:55 ` [PATCH 0/2] " Simona Vetter
2025-02-12 10:26   ` Jani Nikula

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=8734fu1arq.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=masahiroy@kernel.org \
    --cc=mripard@kernel.org \
    --cc=simona.vetter@ffwll.ch \
    --cc=torvalds@linux-foundation.org \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).