Re: [PATCH] drm: Add deprecation warnings to the old midlayer callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 01, 2017 at 07:25:46PM +0100, Emil Velikov wrote:
> On 1 June 2017 at 14:00, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> > Daniel started a crusade a few years back to move control over the
> > initialisation and teardown into the driver rather than drm core, for
> > greater control and far fewer surprises. Help in that fight by adding
> > compiler warnings to the stale functions.
> >
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > ---
> >
> > This is not as useful as I hoped. I wanted for gcc to emit a
> > compile-time warning when a deprecated field was assigned, however it
> > only emits when it is used. So we end up with a lot of noise in drm_core
> > and none in the drivers. However, the runtime warning is probably useful
> > and a motivator for change?
> >
> > Should be made WARN_ONCE though
> >
> I recall suggesting something similar a while back, but Daniel was not
> too happy with it.
> Hope it goes well this time.

The problem is that if we enable it by default people scream regressions!
If we enable it behind a Kconfig, Linus screams Kconfig! And no one else
will look at it.

I'm half-tempted to add cocci-check support to dim to catch these, but
that's also an imcomplete solution.

I'd love to enforce this with tooling though, one way or another, I just
haven't seen something that works well yet :-/
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux