From nobody Mon Feb 9 12:24:21 2026 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 D0938350D41 for ; Fri, 9 Jan 2026 08:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767947927; cv=none; b=u6ciZDZ/qJ1NUrXBx06SoVUO53VuNwmd6Fh9QsqgauENbQC5cCKioLQLgVoaRxe4hAH1AaLLbVMMb9IiECnTQhdLPcrGpr8NKBvzi3YP+RiG91v4pRsyHN+aFztJyVf191q/0zQzUca22TpHPpZquzQo2HZZvTEga0mwmavEga4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767947927; c=relaxed/simple; bh=hQC7FP4uFy0QVNeIoV5XnfaYefHrbJONVVIEMohvuMA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FbU6qvr1e5gksFhtNfEwV5Qc6I00gbGSk0ruomHVkvz1w+dhOtaqrH13Y+iV2XuvNWr22NMugbXmwUyQY02yBC9RpU0xiMbTli/T1RN+ACqQt09f59KKvVkTXW6bF5wEJ5j3QXirsnPCWKExCrRI8AJfntTRlB7L+Msc/n3J+Gk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qfdiocTE; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qfdiocTE" Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-64ba9a00b5aso5720334a12.2 for ; Fri, 09 Jan 2026 00:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767947922; x=1768552722; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=E7QqTZp8PrnJ3a9bxEtgB54OlzIsP95TzLs4Ah0uU9I=; b=qfdiocTExA5RFUrDBd+0dR/3sLITDz27xfUztOtelVq5SV9HQs1TUmjXBy30UcLfFp htyxL5CVNnZ/P88qiFV0vKshUh0i2A3aOtIumy5Ey52NGJUXTTKt17ruk1J2Q7bu20oN qXvqBW5xLG9VOSZlorswGEnlCcI0AYde2vFjSqdi1eC7B64uIabkmO2qzDLurvAvyCjq Nvp4HmIAHrmDsiyJurpMUgcrsiZRI74AnyxBrDwCjW74Uzab47tQceZC6o4kA7fwMJBI jRqDt8xZ9VDy5LUYoxWn94eG8yhjo+iBYRTjNyCp4xrcD7QFB0gc5NRWgaWfcPe4Ioa1 RYAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767947922; x=1768552722; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=E7QqTZp8PrnJ3a9bxEtgB54OlzIsP95TzLs4Ah0uU9I=; b=qBojbaiaiN1QanbZdmYF8rg3WvBPuj+UbZ2MbVh9Tl0X/r2I+Nu/FYL+r+H3ioC57/ wsh63bx1C9+VaOpFNPZqKOu1juGkgaaCr0kDFKj/ZtBVl+B5+Sdw3L8y8YYC+sJscm9+ XT9l117CWpDTIsgpA0V/Dn2J95X0zTGSnH7Xow7W845HQqyu77UGLY79Zct43uU4EUct laRlk0c77PIRLBC/iNEsjqt0crYecxhVD0bKeCrkz0VLAWQBUpSZ2CdsgmBV9K8+W1Zr OWcN8/KNGeKp0i/FP++DVNRrfP9aG59Xb5TFTDFjY/yGA6FnoyVLqA2HXNPPm8/yS50W CFDw== X-Forwarded-Encrypted: i=1; AJvYcCW4KWlgX7IoZa0N8CmJbfh1xowVIqLTMkkTKAk0Kmres4i5r48RKuF1J9lVPdNrkFSRg6QnbK8LOWq9Ygg=@vger.kernel.org X-Gm-Message-State: AOJu0Yzu4nF71/hMtM50zzmGSRmp2MS0eudAqlDb+mCWE+Z2KKZU+VyS VeOEyKXZpX2C7xhTV8ifZOtaTuckLrjgUe5+I7HNkqv4uNTU7b65q3a8GPV70YwOSEo= X-Gm-Gg: AY/fxX7ITv6bhjpSt1ihS56hwcNJ646/6hDJ6+p3C+V0EnbUK0ebuI7GURA5UDoYHKM 2NaKlJUz1aU0eIfBb+vOwDlSMXY7VykThifrP1IQfDQgmGgaHVGYtOUXeu8UNRwQz+8lh5GPnPC //PY2XHRrJVz7XdHkVZ44cW1TrdxZ4odrQXOkazBnb+rpAzUZdJBylikvg9qYu167GZjxdXad4O qz0oDaWIAP7q7M05R1SOP1Hp0qlLN8C+jBzZbVcX8XSZ5Ob1snPNv1NnzP23flawjMRmk9fzitc /bRFTP0zqQ8k2jJgHPDNznAYaKeazyDUoLliE7ZRTX7OiiCHmqHb8bZcfdNVkyNzzrj3MVWsMms oWnOo8siT0fFfpbonNDsBFE6BD+ubq8iY4QZ2mewpkFBN/G+WR5mltqrxNBGjyXadg4dq+uhRkN 3wKam7Nd3Ck14FEYzcfalGQbvmFmi4tRfZamIiVbUWMauL0ZwCWq8wNYTb8SNGqwn/kJP74+1Ce 8Zt2g== X-Google-Smtp-Source: AGHT+IH5ZNRry2+POjUdYlW2DpytYLe/Xx1cqSGa80PgtBhPn3fqpT+AWBOumVspvPMIEoZ9Gfu23Q== X-Received: by 2002:a05:6402:4301:b0:64d:65d:2314 with SMTP id 4fb4d7f45d1cf-65097e5f88fmr7989682a12.23.1767947921892; Fri, 09 Jan 2026 00:38:41 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6507be658b3sm9472950a12.18.2026.01.09.00.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jan 2026 00:38:41 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Fri, 09 Jan 2026 08:38:41 +0000 Subject: [PATCH v2 5/8] regulator: core: remove dead code in regulator_resolve_supply() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260109-regulators-defer-v2-5-1a25dc968e60@linaro.org> References: <20260109-regulators-defer-v2-0-1a25dc968e60@linaro.org> In-Reply-To: <20260109-regulators-defer-v2-0-1a25dc968e60@linaro.org> To: Liam Girdwood , Mark Brown , Javier Martinez Canillas , Jon Hunter , Dmitry Baryshkov , Oleksij Rempel Cc: Peter Griffin , Tudor Ambarus , Will McVicker , Juan Yescas , kernel-team@android.com, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.14.2 Since commit 98e48cd9283d ("regulator: core: resolve supply for boot-on/always-on regulators") we require that a regulator's supply has been resolved before enabling the regulator. Furthermore, regulator_get() also fails if the supply hasn't been resolved yet (preventing consumers from enabling a regulator without its supply known). In combination this means that regulator_resolve_supply() now always runs before the regulator has been enabled via set_machine_constraints(). The code here was meant to run after enabling the regulator in case the supply hadn't been resolved at that time and can therefore never execute anymore since that commit. Remove it. No functional change intended. Signed-off-by: Andr=C3=A9 Draszik --- v2: - drop fixes tag (Mark) --- drivers/regulator/core.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 08bdb1e4175e6d47d154e7a2d859a9d39dcfd021..fd8da369c0529da12d6e80d9003= 2e07bed414316 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2282,28 +2282,6 @@ static int regulator_resolve_supply(struct regulator= _dev *rdev) /* rdev->supply was created in set_supply() */ link_and_create_debugfs(rdev->supply, r, &rdev->dev); =20 - /* - * In set_machine_constraints() we may have turned this regulator on - * but we couldn't propagate to the supply if it hadn't been resolved - * yet. Do it now. - */ - if (rdev->use_count) { - ret =3D regulator_enable(rdev->supply); - if (ret < 0) { - struct regulator *supply; - - regulator_lock_two(rdev, rdev->supply->rdev, &ww_ctx); - - supply =3D rdev->supply; - rdev->supply =3D NULL; - - regulator_unlock_two(rdev, supply->rdev, &ww_ctx); - - regulator_put(supply); - goto out; - } - } - out: return ret; } --=20 2.52.0.457.g6b5491de43-goog