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 04384285C8A; Sat, 13 Sep 2025 13:40:21 +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=1757770821; cv=none; b=HHashdE1mnjEBSj3teWAPrWG/Nf6WZxPD9crHNngaTqKB15P94gJqe7pteqlhAkKvf+r0Hm4XQ8yA/bZvvufkaafLQWUdzC0VhYi56M5+kP2XbCzWLrVCU6Glws28Va12dnI0Dty2SOIDLwC9kzBHeoW+k+kKArfcrhWyjJk/Og= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757770821; c=relaxed/simple; bh=ZK8t2/Y5dzh3AWLi1X5IfyysOrLe0hKSX2Zyd0kpKBE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JVlLIz4xpG8GgJjHpZjTk9aBRaZI3ybqdAHZr/MqJwP7G4tCEuhOpt4YLbmSkJ10bKqisfcsHL0fSL+CI+mAhTofPfVcMiX3LrTzuDi7Fi8AL7zKut659VNC589SPV3qUKiNgbKv8vyROUNK8I7dIEh/E924gTzM2TCcPVjGzrM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SIzo6vQe; 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="SIzo6vQe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1245C4CEEB; Sat, 13 Sep 2025 13:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757770820; bh=ZK8t2/Y5dzh3AWLi1X5IfyysOrLe0hKSX2Zyd0kpKBE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SIzo6vQequ/wa+aUPevcqNvHcU0EqBzT5ZMgvNV8S3q46kVtZmAvXtx/c3RoC+Oi/ HZF4jnbhFGucBPwGTWgTJu8qGxQ96e7C0zQQ1XbkNuNoizYQc3b/pkjBi0sZKqRBLI fcKzizYls8e+XojntHya39vGt9W8ChD2EI81ajNSe9JkgwwJ3Xx+HWA6GOAlsGUGJN n3CNu0tcQz1/LO1Q9MCt4TGZCXdhU2c32UzRvscJrONKlaR+gvtoVtvLeqxXiWDQJ/ AY8LJpEtJQjDOHa2fzkxUzYQ+uBjJr2tmxLtLaiLacego1o0frI3/odq3XpglqD0lt g/9phX51xlXow== Date: Sat, 13 Sep 2025 14:40:12 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: David Lechner , Andy Shevchenko , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Andy Shevchenko , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/6] iio: adc: ad7124: use guard(mutex) to simplify return paths Message-ID: <20250913144012.0e6befcb@jic23-huawei> In-Reply-To: References: <20250911-iio-adc-ad7124-add-filter-support-v2-0-b09f492416c7@baylibre.com> <20250911-iio-adc-ad7124-add-filter-support-v2-3-b09f492416c7@baylibre.com> <6dee1849-45f0-47c8-b29e-8057dee44b6a@baylibre.com> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.50; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 12 Sep 2025 21:07:58 +0300 Andy Shevchenko wrote: > On Fri, Sep 12, 2025 at 12:41:08PM -0500, David Lechner wrote: > > On 9/12/25 12:15 PM, Andy Shevchenko wrote: =20 > > > On Fri, Sep 12, 2025 at 09:19:36AM -0500, David Lechner wrote: =20 > > >> On 9/11/25 11:39 PM, Andy Shevchenko wrote: =20 > > >>> On Fri, Sep 12, 2025 at 12:42=E2=80=AFAM David Lechner wrote: =20 > > >>>> > > >>>> Use guard(mutex) in a couple of functions to allow direct returns.= This > > >>>> simplifies the code a bit and will make later changes easier. =20 > > >>> > > >>> From this and the patch it's unclear if cleanup.h was already there= or > > >>> not. If not, this patch misses it, if yes, the commit message should > > >>> be different. =20 > > >> > > >> cleanup.h is already there. I'm not sure what would need to be diffe= rent > > >> in the commit message though. =20 > > >=20 > > > I expect something like "finish converting the driver to use guard()(= )..." =20 > >=20 > > cleanup.h was previously included for __free(), so the guard() stuff > > is all new. =20 >=20 > Okay, then something like "Cover the lock handling using guard()()..." > The point I'm trying to make is that "Use $FOO API/etc" without new header > being included either: > 1) missing inclusion (proxying); > 2) start using of a new API from the library/header that we already use f= or > another API, but without mentioning that. >=20 I went with the far from subtle solution of adding a line to the commit log that says cleanup.h is already included for prior use of __free() Seemed like that would be enough for Andy's request and so I added his tag (as given to the cover letter). Jonathan