From: Thierry Reding Subject: Re: [PATCH 2/6] drm: Introduce drm_mode_object_{get,put}() Date: Thu, 9 Feb 2017 21:41:37 +0100 Message-ID: <20170209204135.GB26089@mithrandir.ba.sec> References: <20170208182408.5442-1-thierry.reding@gmail.com> <20170208182408.5442-3-thierry.reding@gmail.com> <20170208192814.GF14321@art_vandelay> <20170209170810.mgy4uilbahurymk5@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1539655992==" Return-path: Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 357496EBA4 for ; Thu, 9 Feb 2017 20:41:41 +0000 (UTC) Received: by mail-wr0-x241.google.com with SMTP id o16so13145101wra.2 for ; Thu, 09 Feb 2017 12:41:41 -0800 (PST) In-Reply-To: <20170209170810.mgy4uilbahurymk5@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Daniel Vetter , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1539655992== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LyciRD1jyfeSSjG0" Content-Disposition: inline --LyciRD1jyfeSSjG0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > > >=20 > > > 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. > > >=20 > > > 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. > > >=20 > >=20 > > drm code looks good and is=20 > >=20 > > Reviewed-by: Sean Paul > >=20 > > > A semantic patch is provided that can be used to convert all drivers = to > > > the new helpers. > >=20 > > 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 actu= ally make > > the change is sufficient (See: ickle's s/fence/dma_fence/ series). >=20 > 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 :-) >=20 > 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 --LyciRD1jyfeSSjG0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlic0/8ACgkQ3SOs138+ s6FJyg//V5L2JEUT58i6yJ8kjkp6E6wcv2R0YdngPkWQH/roGPKNt3g5jKyC7l7b gZuCbA1f9+EnvVi2Ud63b+Y+mJFc4jD7TijzlpXQgE+2CPPgYQfkTxARYVV8r3Q7 z+M9ykRBZFhsJUzTleBWbAYBFSFWN+wiegbaqD7OyGd6gs3vVbQ8Vnc17Fg67Vo5 xl2O+FYLi9SGtJ+kSsMv3XsV7HLlQdX32NOf2Vu9KCNMt0EzZ6TMQXlSUepNJz39 DTYqkRLrYBeypFDy1ng4g3Wh7A/uxMQYXRqAXEF5sKCb788bLd8dlZBBUqZi9s6z xCd7glJHbtgHQEoGQw0wmfxuo7X3DPnuJ38fl2HHlGH92ECF8nBlSklRJ+uJp0wt 2GCSZNY4MIxVlH0b7MqP7h6xjrvPLFN8UMwFY92ube6F3yrh7staZv33lVMKF0dP Fzfb/kfUxz/uuf68+cZ3MsL+mNlzkVuM2GmnzSlUUNlRJO3/TCC0VgOUKmKaWLBl KbGa3K4SSSA4OmVmLVbY0ZhDWuXWCoLgelmkubzSls+Wd9aYgnjJGy1VGHL0j1GS H0/8QwHxLEBwCsJjGrpgkWHin0X5FE+iL52HrdaDkEnvOpiXirHU7a7DiusntpK8 42+BWLG0YcIfOiFIGobkv1KMZADZmMsQhv8qeJ8i0cX4Dfbg+r0= =quX0 -----END PGP SIGNATURE----- --LyciRD1jyfeSSjG0-- --===============1539655992== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1539655992==--