From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 00/19] drm: debugfs: Remove all files automatically on cleanup Date: Fri, 27 Jan 2017 10:36:16 +0100 Message-ID: <20170127093616.GA21758@ulmo.ba.sec> References: <20170126225621.12314-1-noralf@tronnes.org> <20170127074934.7fvmfkxa7wioxwt4@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0588400599==" Return-path: Received: from mail-wj0-x243.google.com (mail-wj0-x243.google.com [IPv6:2a00:1450:400c:c01::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59B906ECC0 for ; Fri, 27 Jan 2017 09:36:19 +0000 (UTC) Received: by mail-wj0-x243.google.com with SMTP id kq3so5578469wjc.3 for ; Fri, 27 Jan 2017 01:36:19 -0800 (PST) In-Reply-To: <20170127074934.7fvmfkxa7wioxwt4@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: liviu.dudau@arm.com, linux@armlinux.org.uk, dri-devel@lists.freedesktop.org, bskeggs@redhat.com, tomi.valkeinen@ti.com, jsarha@ti.com, linux+etnaviv@armlinux.org.uk, alexander.deucher@amd.com, daniel.vetter@intel.com, vincent.abriou@st.com, christian.koenig@amd.com, kraxel@redhat.com List-Id: dri-devel@lists.freedesktop.org --===============0588400599== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 27, 2017 at 08:49:34AM +0100, Daniel Vetter wrote: > On Thu, Jan 26, 2017 at 11:56:02PM +0100, Noralf Tr=C3=B8nnes wrote: > > This patchset removes the need for drivers to clean up their debugfs > > files on exit. It is done automatically in drm_debugfs_cleanup(). > > This funtion is also called should the driver error out in it's > > drm_driver.debugfs_init callback. > >=20 > > Two drivers still use drm_debugfs_remove_files(): > > - tegra in it's connectors, not sure if I can remove it. >=20 > I read through them, and they're removed on the component device nodes > stuff. That looks somewhat fishy from a lifetime point of view, and I > think removing all that code would be better, too. What makes you think that's problematic from a lifetime point of view? The component device is tied to the DRM device, so these callbacks are called at the right time. That said, I think it's safe to remove the other debugfs files from Tegra. It might not be possible to remove the cleanup functions altogether, though, because they have to do a special dance involving kmemdup() drm_debugfs_create_files() and kfree() in order to support debugfs files for multiple instances of subdevices. Thierry --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliLFI0ACgkQ3SOs138+ s6GzqRAAjN14OV91hEAYnnjOtrLyS6VuJEapSHV4GfwV74g8xHFWDcPe06PyDM1G dF305VEsGMbhgDLedhzg2ZDOTNn0eGfbIslkeVU/rdeKqsUaDViHaqxSuJNh27lx THNNuoF7SOaF7FD9Ojq63JADD1wwmZ5+/zYfG1w083MPcWsAIIyLMv4PUPxWe9Gk FcvfKHUYUyZMge8DRsACByNuMQcYuOqhMPy+SJ0Skubw/BtRF21LwQqoZYen++5D Zsaws3lyuW4WtRKGS1d0/15U4GzZ08yEVsjYPRkWgTJRdVoDuNA6cnOYlfIEDOth h8NsGcTb/r+JDSSZAT1/4NNiCJBJZF1j5tPLmq82pqiXjN2vjWgwMhvwUk9TH5dF ipvaEOaz2FVsSsujQkrsYLTsTE2V1Vh1OXZYsI+3WZHYnyx+t+guHqDn0gXtBdNf QW8zuKkL91FzqYgZU8L2L3DdK+Yv1zkIQjjBYorWjcBXasH09/BNeG46MNmZLLA/ LB2iu9U3gNPofHpClE5peKRBjmkNwESgGGQgY3RDIBhtjjO/j9JaheI72GLvlEp/ 7ebF9GV9aXIQ3KhRNfGThv+GjmsOe7X94Xcem8LgwJkvf9Et25ZQyk5/1+dtNp5K KwkwD9cTEr+ktd3UOLwgFmyF0lMKDkzXGon03M+CtlVhkUd9tFk= =bMkL -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH-- --===============0588400599== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0588400599==--