From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAF46C32773 for ; Tue, 16 Aug 2022 11:54:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235123AbiHPLyk (ORCPT ); Tue, 16 Aug 2022 07:54:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234969AbiHPLyX (ORCPT ); Tue, 16 Aug 2022 07:54:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08E0A4063; Tue, 16 Aug 2022 04:31:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 66ABFB816A7; Tue, 16 Aug 2022 11:31:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF9B8C433C1; Tue, 16 Aug 2022 11:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660649502; bh=DNGxZGCzNE/W9SNa3AOcpRXwEUSzLHawjI4GPUOozEs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ibyaO5o/Nr/cFFgJEL7PPVekFs+0Q3USPuDu3QwvW87IXj9cmqYanCsbSmFkhICCI /bS/xCmD23/cb+FBxGnzpVz3kjeVAkO2lYjT75WQKNF5axNhVAwouihZTg6FbLvEAY J4D9uKaJlitqM9D4ZYgx+VikKjvj7peGJBkuhBXKCVwCi46fJVtOhi63JN8hMrZFCH UkfZ0SYPO3LlM1dZqhAEgMC/gX42n3x6mQYJi/OWry/0M9xvDVAnxC5iuOOswm5mZI QOIIYWVpSbd9EF5OhCbydJMADpl7C+bCAHQspCqNHYt9riKK17LZaBtj0TiuX1S5h2 kfxfjwbz6D43A== Date: Tue, 16 Aug 2022 12:31:31 +0100 From: Mark Brown To: "Vaittinen, Matti" Cc: Matti Vaittinen , Laurent Pinchart , Stephen Boyd , "dri-devel@lists.freedesktop.org" , Johan Hovold , Neil Armstrong , Lars-Peter Clausen , Kevin Hilman , "linux-kernel@vger.kernel.org" , Daniel Vetter , "linux-amlogic@lists.infradead.org" , Greg Kroah-Hartman , "linux-doc@vger.kernel.org" , Jonathan Cameron , Andy Shevchenko , Liam Girdwood , Michael Hennerich , Miaoqian Lin , "linux-arm-kernel@lists.infradead.org" , Alexandru Tachici , Jerome Brunet , Andrzej Hajda , Jonathan Corbet , Guenter Roeck , Jonas Karlman , Lorenzo Bianconi , Michael Turq uette , Jernej Skrabec , Martin Blumenstingl , Jean Delvare , Alexandru Ardelean , "linux-hwmon@vger.kernel.org" , "linux-clk@vger.kernel.org" , Nuno =?iso-8859-1?Q?S=E1?= , Robert Foss , Aswath Govindraju , David Airlie , "linux-iio@vger.kernel.org" Subject: Re: (subset) [PATCH v2 0/7] Devm helpers for regulator get and enable Message-ID: References: <166057828406.697572.228317501909350108.b4-ty@kernel.org> <20220815205857.308B1C433D6@smtp.kernel.org> <57c312b3-ca5b-6efb-6356-43b6513a0c88@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GRi4H55EvexP+ViS" Content-Disposition: inline In-Reply-To: X-Cookie: A bachelor is an unaltared male. Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org --GRi4H55EvexP+ViS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 16, 2022 at 11:06:21AM +0000, Vaittinen, Matti wrote: > I wonder if writing such 'release callbacks' is compulsory? I mean, if I= =20 > was writing a driver to some new (to me) subsystem and was required to=20 > write an explicit release-callback for a resource - then it'd surely=20 > rang a bell about potentially double freeing stuff with devm. Especially= =20 > if the doc stated the callback can be called after the driver has been=20 > detached. Generally yes, thoguh people can and do leave them blank and it's easy enough to do some cleanup in there that assumes that the device is still present and not think the device might've gone away especially if the hardware isn't practically hotpluggable. --GRi4H55EvexP+ViS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmL7gBIACgkQJNaLcl1U h9AzDwf9HyzkouCr6DLxGa2jy+krXW2whkKczGUewYVjLonIovCKJI3OKOOMeqaZ rggHFUZDlyHpe4f23sQn190TBdngSGLYf1nrOt1WMUf3vCkLA05c7RcsGPCZdlGm TaL1HglUSxZ6Mce97JyRZ3k3Uw28ImBl0LWx3nunXvOqv6UUjs0cc0NdiGSD3JEA q7cLUiSYA4BzPVJg8bAXNNgXRdqY08D9aqih79uT+vgmcurosxM9InLGjKWb4xRw UlVPhgqtHOGKTfgLfNuPG7s+nSv91LUEf43AMjI0HE92IutdyHoYhleNfB5V7kAU vbqH3vEZToSso212DUSGKfURUbqHBg== =2bTO -----END PGP SIGNATURE----- --GRi4H55EvexP+ViS--