From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 B2A2B378D81 for ; Fri, 30 Jan 2026 11:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769771445; cv=none; b=C0nq/HtN7Mhx8X469reBU9v1BUPySqw1NaiKapRSZBd/Mwd6d1zB2Qxu/zZsNechKKyiblk012VhVKPlOW8i3/kaRl4jQq2FF5MGRcOWzjPFmEd8/VlgIRm9CNKY4xyO6BCluwjt21xwXpqCZItOcDGImDIg/ln1YG604j/14VU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769771445; c=relaxed/simple; bh=grxsWiSQIWYptfHyeCAe36YzyB1aNPsrBaAkZWRkASA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hVyijzYCyYJtBRFYATXlCLZscZg8qdtXjGu+sTtFC1mXGzQlHwYhjYcIxyRBHc3VyTVRV2TKtzoQnk/YaLNt8kbnovZtJICrQFrb4VvW1Z37sjLjFHC4usxbvdbAKGjXsjHksFP/Kfm6DSkKOfQkKbE3xv0aRZjiZPzNoHmhy/g= 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=XyGj0mcO; arc=none smtp.client-ip=209.85.208.45 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="XyGj0mcO" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-658d4059b79so2611130a12.1 for ; Fri, 30 Jan 2026 03:10:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769771442; x=1770376242; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P+Oe6WMhUi1fD7716YH3wMzfV07CChalwfEI7z463Rs=; b=XyGj0mcOnN6lk70zRZzqlBBeo6gsr1B9ooypuJxVJb/5k3zOUpCy6Qn2Nl0xppiSb4 DAAbX3uYSO2A/yD5wam5Spy5ETOA9rY4JJiuHft47uNiHKDeLbtaBdgjdYwT0gzMvG+t qnqcV8P28GiBmvRcwFnkrpbOwvpweEN3nUXgByxy6P4GFViam7PuQKYHPKzAw62YlUp9 5xGjVWAP7s7Wraiwps44uagLmjpkXQViYRkX5tqvMbp0V3tI4q/PP/kByHjdm6YaaqqL LVeLtFs1yY+lba1q/zQWkwTSncMAY0j2trlUd4QMoLfrK+LTmRiEUOR/EXfQz4u+jMk6 uFcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769771442; x=1770376242; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P+Oe6WMhUi1fD7716YH3wMzfV07CChalwfEI7z463Rs=; b=npRdAXLlbKdfJq00h2KcgCjlUawpGRD4vXfQjHDQmYm5YU62FghishY/CM5S7musnc 00oxkcMrkCaCXdos7VILdcipvp92q3TamEdN5E79rS/47+x6q+D0GgoNWWYti5DTNdrZ uEHFiWgmX7jTbIeyJExpyflQS1HMINd76vf5Q5qpfeueIEDWlntRDEja7Tngc6WFhVgR H49mYoSyvKKK9XbnioIeWJtp9T5J6qp7aA6PxZ9h2bI34D1pcvFVX9KmV9YJB4u0rlb0 7X3bvPDJDG2jUmC1xwDDjE8dCwxkSIJe5PW4PSeIZjRg+H0rQqs4h1qseBkTpEntb2eW ZOqA== X-Forwarded-Encrypted: i=1; AJvYcCWc195IuS7nNMQ4ONJD3z0RzmPo0lUY3aEGMt+RiqkVFnL2H1/qKlg5IV1OQf2+verwNutLDiNVlKGnMUw=@vger.kernel.org X-Gm-Message-State: AOJu0YwhRkFvvn0icV1r10C8T1jyg7e/wg9Ze3YRNCrORayAlGVCR8T2 cTrdp1xxcekJk8SmRnlWMc0Z6Fm4bsIlC72Y7sJaGM8WjbMe3krnGn9b X-Gm-Gg: AZuq6aJyLPTbTIjZnQkn7nFWR6FBaQ5ClGKjdjppk8jbNCdDei7VNf3/kZb7AsaFBIS J3Lpn8aw0SRJ5Wuj+vxL5sxXuv4MxloRfU24QkrGRzK7tPs/dhDxYMOoDtcmLJGmj4h9hrDCJBP iAgp+nnWPQgEi/9IVlCHvNLt/JeDEaa4sRp0ez/J8EwZgVi+tS90lK8JqqZ7/qDjr59KhK+We3M Qvh4eBcOvZEx6IYNKBWe3yNTuADq2+F2pouZLc1WqlFEt1tUBMYJBhv0iOYYmsq3TeIQ+RCC73c 6xS7IWpZe38ZeH1cVc5rtckygjALRz2iHbcTLkQaHuJ2Gs2KVXDALoiEdUnTmhildN8IcQwJee7 TaPCGXoZhXJGACXkEJNhJaTYsE6Il/kf6YYfxMIogXHu08iyu2KZshV2m3mRQd3Sdz8Y+lJME3T 3N4i6nhR9dDR1nlDGNDDoSzy0qo6ajvA== X-Received: by 2002:a17:907:3d0c:b0:b87:d09c:1824 with SMTP id a640c23a62f3a-b8dff5150ddmr126853866b.3.1769771441743; Fri, 30 Jan 2026 03:10:41 -0800 (PST) Received: from NB-6746.corp.yadro.com ([188.243.183.148]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8dbeffedd3sm396035666b.29.2026.01.30.03.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jan 2026 03:10:41 -0800 (PST) From: Artem Shimko To: andi.shyti@kernel.org, p.zabel@pengutronix.de, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, jsd@semihalf.com Cc: Artem Shimko , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/2] i2c: designware-platdrv: simplify reset control and fix cleanup on probe failure Date: Fri, 30 Jan 2026 14:10:35 +0300 Message-ID: <20260130111039.874548-1-a.shimko.dev@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series simplifies error handling and reset control management in the DesignWare I2C platform driver. Patch 1 replaces the manual reset control acquisition and deassertion with the devm_reset_control_get_optional_exclusive_deasserted() function. This simplifies the code by eliminating explicit deassertion calls and associated error handling while maintaining the same functionality through automatic resource management. Patch 2 removes the unnecessary goto label for cleanup on probe failure. The cleanup operations are straightforward and can be handled directly in the error path, making the control flow more readable without changing the error handling semantics. Thank you! -- Regards, Artem ChangeLog: v1: * https://lore.kernel.org/all/20251009074443.2010699-1-a.shimko.dev@gmail.com/ v2: * https://lore.kernel.org/all/20251009083703.2038187-1-a.shimko.dev@gmail.com/ v3: * https://lore.kernel.org/all/20251111140935.3220840-1-a.shimko.dev@gmail.com/T/#u v4: * https://lore.kernel.org/all/20251111145536.3232456-1-a.shimko.dev@gmail.com/ v5: * * [0/2] https://lore.kernel.org/all/20260123100537.1429497-1-a.shimko.dev@gmail.com/T/#u * [1/2] https://lore.kernel.org/all/20260123100537.1429497-2-a.shimko.dev@gmail.com/T/#u * [2/2] https://lore.kernel.org/all/20260123100537.1429497-3-a.shimko.dev@gmail.com/T/#u v6: * All reset related changes have been carried over to Patch 1 Artem Shimko (2): i2c: designware-platdrv: simplify reset control i2c: designware-platdrv: fix cleanup on probe failure drivers/i2c/busses/i2c-designware-platdrv.c | 41 +++++++-------------- 1 file changed, 13 insertions(+), 28 deletions(-) -- 2.43.0