[PATCH 2/6] drm: Introduce drm_mode_object_{get,put}()
Thierry Reding
thierry.reding at gmail.com
Thu Feb 9 20:41:37 UTC 2017
On Thu, Feb 09, 2017 at 06:08:10PM +0100, Daniel Vetter wrote:
> On Wed, Feb 08, 2017 at 02:28:14PM -0500, Sean Paul wrote:
> > On Wed, Feb 08, 2017 at 07:24:04PM +0100, Thierry Reding wrote:
> > > From: Thierry Reding <treding at nvidia.com>
> > >
> > > For consistency with other reference counting APIs in the kernel, add
> > > drm_mode_object_get() and drm_mode_object_put() to reference count DRM
> > > mode objects.
> > >
> > > Compatibility aliases are added to keep existing code working. To help
> > > speed up the transition, all the instances of the old functions in the
> > > DRM core are already replaced in this commit.
> > >
> >
> > drm code looks good and is
> >
> > Reviewed-by: Sean Paul <seanpaul at chromium.org>
> >
> > > A semantic patch is provided that can be used to convert all drivers to
> > > the new helpers.
> >
> > I'm not convinced we need to commit the cocci patch. I think including it in
> > your cover letter and then following up with a follow on series to actually make
> > the change is sufficient (See: ickle's s/fence/dma_fence/ series).
>
> Yeah, if you do a large-scale refactor anyway, I think it's best to just
> store the cocci in the commit message. I think storing the cocci is ok if
> you have thousands of hits among lots of subsystems, and it's clear it's
> going to take at least a few release cycles or maybe even years to clean
> it all up. drm is luckily not yet that big :-)
>
> I'll drop this while applying if no one minds ...
I thought it was actually quite nice that this was part of the series.
That way it doesn't get lost and it is really easy to rerun. Also it can
trivially be removed once we've converted everyone to the new functions
and removed the old ones.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170209/f5165476/attachment.sig>
More information about the dri-devel
mailing list