[PATCH 2/2] drm: ensure drm headers are self-contained and pass kernel-doc
Masahiro Yamada
masahiroy at kernel.org
Sat Mar 8 17:05:00 UTC 2025
On Wed, Mar 5, 2025 at 10:59 PM Maxime Ripard <mripard at kernel.org> wrote:
>
> On Wed, Mar 05, 2025 at 03:05:25AM +0900, Masahiro Yamada wrote:
> > > 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.
> >
> > This results in a false check for include/linux/.
> >
> > I don’t see much sense in doing this exceptionally for include/drm/
> > after we've learned that it doesn't work globally.
>
> As far as I'm concerned, I find this extremely helpful for DRM. If only
> to ensure that the huge amount of work that went into cleaning up our
> headers doesn't get lost.
>
> Nobody here claims that it should be enabled globally, just that it
> should be enabled for DRM. We already have plenty of exceptions like
> that for compiler flags, checkpatch, contribution process, etc. so I'm
> not sure why those would be ok, but additional checks limited to a
> subsystem wouldn't.
>
> Maxime
Because we learned this feature is broken.
It was broken under include/linux/, so it will be broken under include/drm/ too.
Headers are included conditionally.
There is no need to make them self-contained in all cases
by compile-testing every header detected by the 'find' command.
I am very negative about this patch.
I hope the upstream maintainers and Linus will not pull this.
--
Best Regards
Masahiro Yamada
More information about the dri-devel
mailing list