From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B62293DCDBB for ; Tue, 9 Jun 2026 22:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781043484; cv=none; b=ElDtKVZWnzlJ9rcdBeXTA09B1ARwl3j/MEsre50FQuxRhI6XKbALUR0cAnFmZbgQgssKfKRKN6HGsxop/sDBlltjAH1Z7R9u4TH73lzP1R1ucmJqaGEEPBq8irq8oIBEVa1FS8tvA+K8oVQJ1ym0GC+zEK5VIRi7a8mWK2YxKRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781043484; c=relaxed/simple; bh=bp9vN6jZ1qqJXo57oXyDMe2yeBIZWtXZAexmNXD2P/k=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K7Hwsc7gXeVHvaDZ1l/T9vGcI05VgAVlJndc6Upv40RBjkgaGRVc4xjMaiGskBuT+5GPdAfdXz7lJOg5wfCpfBQKTyQwcc2bBO0dhQ5vOheLBZwV/9s2t2z3C1R8MHjAqn0QvhkHqHC4wyc5sUDgfeWpY4so3lLRWYcubmvwGXs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZyR1GQUN; arc=none smtp.client-ip=209.85.167.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZyR1GQUN" Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-486304fa184so5362699b6e.1 for ; Tue, 09 Jun 2026 15:18:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781043482; x=1781648282; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=iPAKqbhj+nb7blUntMtn89PVQtI2/C9ilf8/hnaPy4w=; b=ZyR1GQUNLbFPjXGNhgB7g5qHx9yztNjCUjWZScN1XU/RBw3DiSA3sq6RA8bRe3TC3V IvELDWIEMh9KjXA1n/uw6PkzB7hOzDZWWp6vp8mxaPKdlwFh93eIQXHbMv0ao2emwguU ySnwoNNzLN0CDZiFTpA3BE414plH4sE6O0EJB2EC8ACbTjlCdu/qiZ43n2CjVj8ZPvGH fccDuWbjxLAfS16cuO7/kPRL+DW0wUM1G5zDcvUYgazMHxLefqIoJTtirNYT9hYM8bNN zxccNn8AQH7Vf0HzCpvZXGbDBdx/wIMiOLc8V8pki3haI1t/ccAO6gLMx/7OENJz3BF6 gQ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781043482; x=1781648282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=iPAKqbhj+nb7blUntMtn89PVQtI2/C9ilf8/hnaPy4w=; b=oeeb06UFps1r3eYUWJWxU3e9+cGiKUxILcLprPPol5RxM+aGAp4aVgZTKlulbCQ4Mn klluCKlRRkFfX7QNK852HB0pYcKszhIpy5W6WzYioTFcct6nIgjmUiVu4G7xg1cuP56d o8dxSpB+RJu8Q9uPPzUEHqbg6e6z2KRh13dMDHK1fULLibz13m42vkK5vh5g27cyj3XJ R1B1Mn1fjGC3zKNxkmD4R2tckupHGAvppmoyWxQfO0A8wB4FFH2yokFWzNPacQgYqO2m V/0r1YDBUSeXciWGVYj7PAGoeIj4oVpvxtyF2i5uUB4stOIBehn9WQkDbm/3eWngS9p0 LHMA== X-Forwarded-Encrypted: i=1; AFNElJ/jkJBZcCxPGBUIb3XGwubmrc52T33UmfbfaOi5QyfHr0yTo1PeHji9Kqm9S44GH+8y529xXyQw9grGltU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0if/45jZsx6iX12k8p4GGz7jnmNvgcOU1kHWQBx8p8Jt/UEeO i+U3stMNFAq+CCSXlgyjn1zDCAiXg/m8tvb83Parf/Y52YtUb5SLuJbB X-Gm-Gg: Acq92OHH2+CVcdzlLX3zA8qT/3mDxt1xgYQAg1DegVuIhhj0WRUX5aD4/lZ6hONDnF2 568rG5mVTRn3cnJXFu49GuZt1TN9YDj3+eCsH0VReWaS/YK1ehbCcn3TEGrUZtkdREqujSPUyV2 UEDqSERjXqbydqhom39HZJKxkdXFwWF0NG/VNAZ9KVdmX3N4HYtiChCxOsUbrfSzdSy+Qc0/o/a 8Ae2iRgZUjOfm8D8yb09JPXyAwmFVtFu3HDmg+lDxA9j6RoBzcDThzXZhqmdz5jED2L6WlZGCGy LrY28hQYxCauN6YJjBFWaoe5k16Rif9C3thU4a4yRDQwH3H7x5ML8BXCiuIv3iM5nTwjqzvwZ+8 fNmzEieV9YWO09amAVbEn1v+xlmE2/TUWFTtNVELawJHvqBZdcIzpDtBgMecOD3gNqXQ1hMhKPR ElqECBWazADc3Dcu4f4hJU+bFaeJSrZ5MOV3c62wRNCMs8T+TDbp4oB7p5A84kQ1SKaUUujxatD w== X-Received: by 2002:a05:6808:3510:b0:479:da60:7dcc with SMTP id 5614622812f47-486f0230e20mr3210573b6e.35.1781043481754; Tue, 09 Jun 2026 15:18:01 -0700 (PDT) Received: from linuxescape (23-88-128-2.fttp.usinternet.com. [23.88.128.2]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4865ba20b68sm17401625b6e.18.2026.06.09.15.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 15:18:01 -0700 (PDT) Date: Tue, 9 Jun 2026 17:17:58 -0500 From: Maxwell Doose To: Rodrigo Alencar via B4 Relay Cc: rodrigo.alencar@analog.com, Michael Auchter , linux@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Kees Cook , "Gustavo A. R. Silva" Subject: Re: [PATCH v2 11/12] iio: dac: ad5686: write_raw: use guard(mutex)() Message-ID: <20260609171758.2077ebd5@linuxescape> In-Reply-To: <20260609171302.5764edb2@linuxescape> References: <20260609-ad5686-new-features-v2-0-70b423f5c76d@analog.com> <20260609-ad5686-new-features-v2-11-70b423f5c76d@analog.com> <20260609171302.5764edb2@linuxescape> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 9 Jun 2026 17:13:02 -0500 Maxwell Doose wrote: > On Tue, 09 Jun 2026 11:13:06 +0100 > Rodrigo Alencar via B4 Relay > wrote: > > > From: Rodrigo Alencar > > > > Use guarded mutex lock to facilitate code review when adding new > > attributes. This will allow for early returns, avoiding error-prone > > locking and unlocking in error paths. Gain-control support will add > > the scale attribute. > > > > Signed-off-by: Rodrigo Alencar > > --- > > drivers/iio/dac/ad5686.c | 14 +++++--------- > > 1 file changed, 5 insertions(+), 9 deletions(-) > > > > I agree with Joshua on this, linux/cleanup.h should definitely be > included. However I don't think sending a v3 is worth the trouble > (Jonathan may tweak while applying but I wouldn't count on it), so with > or without: > > Reviewed-by: Maxwell Doose > Although I will note that it appears that you haven't converted all of the locks to guard(mutex)(). While its only in two spots you should probably convert all of them. Either way, patch is obviously correct (besides IWYU), so I still stand by my rb. -- best regards, max