[PATCH 36/36] drm/gem: remove _unlocked suffix in drm_object_put_unlocked

Sam Ravnborg sam at ravnborg.org
Fri May 8 11:02:51 UTC 2020


Hi Emil.

On Fri, May 08, 2020 at 11:15:24AM +0100, Emil Velikov wrote:
> On Thu, 7 May 2020 at 19:14, Sam Ravnborg <sam at ravnborg.org> wrote:
> >
> > Hi Emil.
> >
> > On Thu, May 07, 2020 at 04:08:22PM +0100, Emil Velikov wrote:
> > > From: Emil Velikov <emil.velikov at collabora.com>
> > >
> > > Spelling out _unlocked for each and every driver is a annoying.
> > > Especially if we consider how many drivers, do not know (or need to)
> > > about the horror stories involving struct_mutex.
> > >
> > > Just drop the suffix. It makes the API cleaner.
> > >
> > > Done via the following script:
> > >
> > > __from=drm_gem_object_put_unlocked
> > > __to=drm_gem_object_put
> > > for __file in $(git grep --name-only $__from); do
> > >   sed -i  "s/$__from/$__to/g" $__file;
> > > done
> > >
> > > With this patch, the _unlocked define is no longer needed - remove it.
> > >
> > > Cc: David Airlie <airlied at linux.ie>
> > > Cc: Daniel Vetter <daniel at ffwll.ch>
> > > Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> >
> > I had prefeered this was spilt in three patches:
> > 1) drm_gem*
> > 2) drm_client, drm_prime, drm-mm
> > 3) Removal of the define
> >
> > Maybe just squash 1) and 2) in the above, but I like it spelled out that
> > the backward compatible define is dropped.
> >
> Think that we can combine your and Thomas' suggestions:
> - fold all of drm in once patch - move it all to patch 11
> - keep the #define removal as separate patch
Yup, sound like a good plan.

	Sam


More information about the dri-devel mailing list