From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH v3 22/22] drm/tilcdc: Use devm_kzalloc() and devm_kcalloc() for private data Date: Wed, 24 Feb 2016 14:38:15 +0200 Message-ID: <56CDA437.3060706@ti.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2141940480==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B1176E062 for ; Wed, 24 Feb 2016 13:44:09 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jyri Sarha , dri-devel@lists.freedesktop.org Cc: laurent.pinchart@ideasonboard.com List-Id: dri-devel@lists.freedesktop.org --===============2141940480== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3rOCvnJXijJqLf2ifu4jtKVGGNiqIcJGS" --3rOCvnJXijJqLf2ifu4jtKVGGNiqIcJGS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 23/02/16 17:03, Jyri Sarha wrote: > Use devm_kzalloc() and devm_kcalloc() for private data allocation at > driver load time. >=20 > Signed-off-by: Jyri Sarha > --- > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 +--- > drivers/gpu/drm/tilcdc/tilcdc_drv.c | 19 +++++++------------ > drivers/gpu/drm/tilcdc/tilcdc_panel.c | 20 ++++++-------------- > drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 24 +++++++----------------- > 4 files changed, 21 insertions(+), 46 deletions(-) I see you took one step further and used devm_alloc for the crtcs and encoders etc too =3D). I don't see why that wouldn't work, though, as the= y are all created at init time and freed when the driver exits. However, at least omapdrm does handle freeing in the specific _destroy callbacks, so I do wonder if there's some reason for that... Did you test with tilcdc as module, with all the kernel debug options enabled, and a few load/unload module cycles? Tomi --3rOCvnJXijJqLf2ifu4jtKVGGNiqIcJGS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWzaQ3AAoJEPo9qoy8lh712qEP/iYyCHIN5OZ6cNWbTXJvvHTi Ge+70esxXqEuBjqSDUpi/coTD97TSXz+80u6efgrsCoifMz8FukNxx+1zcKAzt8E z9K9YCuiTTlgRQJAqziyXkcCr24uNqVnQtVkzrz0+J0cagsMdzZJWAhUYzzORU3B BC/oVCS22ZhKDvAwq07WCoV0RWPTlNfjPcqYmRd8z+ieiEzWE7/MLkVkLZqwIWiL 2529Bzi3SFNJynM+5l+RHgJWL71rluuA9fx5HDUCBFY9COUFBtZfs+eAjX3Eu4a/ Ungd8SIatzcjWdxWUn0jXm/RS5LA5VLKU6L0kT35twu629TbClXCcSx27qhkgagX hoO1ECf2lstantAATJCURqoX09XT8P9lPiF/0MBDXRDXofyt679/sjpd8pfJjoVg RLfAvEu0wQtsoRnpwUfrG1kMY4yyfHyGPUIPPRCtPaibXDWImKT0LWxXM6ENgSIN /+6PwmqASAnOIp5i0qdKzihXnePdSUNUnJwfGP9DeW5k6VuNVcS6HimMXnMoelVk yv6hqoX1MoAM+99KTSRFXj8ch5z3NOkXzrfIO0aPfKJAFQhCGHOdBegRaDJ0rZT5 gwkXLWauwGJXN9utOz23Ggll+eKAHzUU/P+pA3uhHcDwYH627kkrArXo9ZOFxmrd i7EcUDwc3VFp9SsSKAQo =ji9R -----END PGP SIGNATURE----- --3rOCvnJXijJqLf2ifu4jtKVGGNiqIcJGS-- --===============2141940480== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2141940480==--