From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBC45345757 for ; Fri, 20 Feb 2026 15:43:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771602216; cv=none; b=tnA8MTeOVaIx72S5YwGJMOhzNnHh1U5tOk/4WDDLCTSwPzEZXhxAPKhdQf5W12UXVbcQehr+LgZ4pc17bqCttJtAlZCQmY25M33xPb6klA/5xZCIPTaaenvRpNvr5JCWhngLUFn/WMWIKOHPaYX23jnTw+EjlE8uyAtzBYSshJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771602216; c=relaxed/simple; bh=xPlIMoTtrCt+9MncSTs7dcpOPSU/T5hFDpk9NkEknVI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PCN1iMJsTnLHuJeFsCes1CMLdMziVnLfuQm7iHerlfcjYEAnmItqkWUg4oduX7c+uEWmE6+pc1OmHSXftCMQdHfdtkPr+aBOXzSbUBGXKIcpXLFlCiDa+X180m0/0BkU5FderZSKPimn2W46RkxmVb9yY76tNheE46+ietrOzDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BHb8jQGf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BHb8jQGf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0966C19421; Fri, 20 Feb 2026 15:43:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771602216; bh=xPlIMoTtrCt+9MncSTs7dcpOPSU/T5hFDpk9NkEknVI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BHb8jQGfCWXId39SKnUeAZV38E2b8WED8+9Rxs8HLr1FsVaEjT/uiy9JBQauhM2J/ JtGqfOvzCEajgocs99f2cvqRTAmEFXgcGFDc6H8hsNjpR9/hYunYHClSfxptQPcNI6 TTBPvZBreRVH01ic16kobkiI3HiyaM2E5N4Tr9d4GBCw1qZjx1tk2t0+u4HM8mCOPA TCUk33NKrWyCJ3xjetYOC3ZbLPl/NvyPo9FIkUWttOu2IsOCRDKdGTpdBC6/7xM0St Jnw46QHGe8Skqw+4x4Jk3A02YgmgEZBchfLGdkbJelXv73nF91EL8z7fWTDBWcKi1Q cQccLCvzSLW5w== Date: Fri, 20 Feb 2026 15:43:32 +0000 From: Mark Brown To: Sander Vanheule Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] regmap: define cleanup helper for regmap_field Message-ID: <4ddbaa4d-7dc5-4fbe-aadd-d903b3e99778@sirena.org.uk> References: <20260220153646.494683-1-sander@svanheule.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dxhplp9+ihvOrzIE" Content-Disposition: inline In-Reply-To: <20260220153646.494683-1-sander@svanheule.net> X-Cookie: Booths for two or more. --dxhplp9+ihvOrzIE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 20, 2026 at 04:36:46PM +0100, Sander Vanheule wrote: > struct regmap_field *field =3D regmap_field_alloc(...); > if (!field) > return -ENOMEM; >=20 > int err =3D regmap_field_write(...); >=20 > regmap_field_free(field); >=20 > return err; That seems like a bit of an odd pattern, I'd expect the fields to live for the lifetime of the driver rather than a function. OTOH if people are doing that then sure. > The included headers in regmap.h are not sorted, so I just included > cleanup.h at the bottom of the list. Let me know if the headers should > be sorted too, then I can make a preparatory patch. Yes please. --dxhplp9+ihvOrzIE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmmYgSQACgkQJNaLcl1U h9Brewf/fnX4y3UTe1HDWGRX9lD14ZUi5twJe+X7x0HMo3dG/Gy8McMd6pMj5Js8 LInP9CG5MLy/AIMbyLJ7RTyzbqatzHxz5h5xMnuTO4umerL/6l14eZn3g8whZfps rPWynKDpXpQ/hDbsD+EI+xPdtDQ7sWdGzmsYxpBkm/ZM8Sjot23aL3ksnyk4N6gM 8ksZFlyHde9CHNmxqw7Fss2nIUsuoplCQ9gcVBnqKeCy3MOIS3BOasnPsGihrhw0 OM3iMFEfBmnA4QA8XtZ2P4hrKAG7WqIpJncgcHgjW/wjTwXmXr/vqz1O6oaq6JBa iZBP6WOKcILAI5SwgWBGbLC2Ee+0TA== =L5y3 -----END PGP SIGNATURE----- --dxhplp9+ihvOrzIE--