From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Zimmermann Subject: Re: [PATCH] staging/vboxvideo: Replace ttm_bo_unref with ttm_bo_put Date: Mon, 10 Sep 2018 10:39:57 +0200 Message-ID: <6bb021ce-63b7-da82-7f47-e3e5311a306d@suse.de> References: <20180731063735.11899-1-tzimmermann@suse.de> <20180802072957.GA14038@kroah.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0749999076==" Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34E9488FBD for ; Mon, 10 Sep 2018 08:40:03 +0000 (UTC) In-Reply-To: <20180802072957.GA14038@kroah.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Greg KH Cc: hdegoede@redhat.com, michael.thayer@oracle.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0749999076== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vWTzhbVSwlDALE7T2NWuqy4UklhzanWFf" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vWTzhbVSwlDALE7T2NWuqy4UklhzanWFf Content-Type: multipart/mixed; boundary="mQqHhm6yBxYd8Ten16y0xNZWuraFKtbDh"; protected-headers="v1" From: Thomas Zimmermann To: Greg KH Cc: hdegoede@redhat.com, michael.thayer@oracle.com, dri-devel@lists.freedesktop.org Message-ID: <6bb021ce-63b7-da82-7f47-e3e5311a306d@suse.de> Subject: Re: [PATCH] staging/vboxvideo: Replace ttm_bo_unref with ttm_bo_put References: <20180731063735.11899-1-tzimmermann@suse.de> <20180802072957.GA14038@kroah.com> In-Reply-To: <20180802072957.GA14038@kroah.com> --mQqHhm6yBxYd8Ten16y0xNZWuraFKtbDh Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi Greg Am 02.08.2018 um 09:29 schrieb Greg KH: > On Tue, Jul 31, 2018 at 08:37:35AM +0200, Thomas Zimmermann wrote: >> The function ttm_bo_put releases a reference to a TTM buffer object. T= he >> function's name is more aligned to the Linux kernel convention of nami= ng >> ref-counting function _get and _put. >> >> A call to ttm_bo_unref takes the address of the TTM BO object's pointe= r and >> clears the pointer's value to NULL. This is not necessary in most case= s and >> sometimes even worked around by the calling code. A call to ttm_bo_put= only >> releases the reference without clearing the pointer. >> >> The current behaviour of cleaning the pointer is kept in the calling c= ode, >> but should be removed if not required in a later patch. >> >> Signed-off-by: Thomas Zimmermann >> --- >> drivers/staging/vboxvideo/vbox_main.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/v= boxvideo/vbox_main.c >> index 9d2018cd544e..fc7293b756b2 100644 >> --- a/drivers/staging/vboxvideo/vbox_main.c >> +++ b/drivers/staging/vboxvideo/vbox_main.c >> @@ -490,9 +490,8 @@ static void vbox_bo_unref(struct vbox_bo **bo) >> return; >> =20 >> tbo =3D &((*bo)->bo); >> - ttm_bo_unref(&tbo); >> - if (!tbo) >> - *bo =3D NULL; >> + ttm_bo_put(tbo); >=20 > This function is not in my tree, so it causes a build error. I guess > merge this through the drm tree? The required function ttm_bo_put() is now available in mainline. [1] Can you please try again merging the patch? Thanks! Best regards Thomas [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit= /?id=3D89c815ef07a1db0ac2cc09d06cb2d5c3d86d6322 > thanks, >=20 > greg k-h > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel >=20 --=20 Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstr. 5, D-90409 N=C3=BCrnberg Tel: +49-911-74053-0; Fax: +49-911-7417755; https://www.suse.com/ SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HRB 21284 (AG N=C3=BCrnberg) --mQqHhm6yBxYd8Ten16y0xNZWuraFKtbDh-- --vWTzhbVSwlDALE7T2NWuqy4UklhzanWFf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAluWLd0ACgkQaA3BHVML eiMLlAf7BbYfNGfAuiBF1dk94e/L7KZUdQtJ/xcrYZA1E08OWdOTyHTSdvlZNX6o zNSK8s873nVZTx9FHpnx4Izx/kU4pKxvUbaIExxf4V+ZKohQK0OPHdM83cdZh0po Nz18NKt+XK/SVfeDDbMxvWpXUVAnEHFek7nE0eJAmrh5t1ht9yNuV5nzrh8ceQo8 ZvrahtoXWTDcRrDSWlhan/pBdbAlVCjvSNFsZDt0tN2uqCKiNmaQzMYf9A5vBal+ cRqftfBLTCAF7+3+XYkoVZvKSu1Y8Vwtg/99nizATrrYcPR+PVjMYH65tTX/HwWu 21r3bsFKYac7qoB7HGmXUrPu9r+oSA== =Or8T -----END PGP SIGNATURE----- --vWTzhbVSwlDALE7T2NWuqy4UklhzanWFf-- --===============0749999076== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0749999076==--