From: Mark Brown Subject: Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable() Date: Tue, 20 Nov 2018 15:54:58 +0000 Message-ID: <20181120155458.GG3894@sirena.org.uk> References: <20181120002654.1891-1-dianders@chromium.org> <20181120002654.1891-7-dianders@chromium.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zGQnqpIoxlsbsOfg" Return-path: Content-Disposition: inline In-Reply-To: <20181120002654.1891-7-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Douglas Anderson Cc: Bjorn Andersson , evgreen@chromium.org, swboyd@chromium.org, Dmitry Osipenko , ryandcase@chromium.org, David Collins , linux-arm-msm@vger.kernel.org, Liam Girdwood , linux-kernel@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org --zGQnqpIoxlsbsOfg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 19, 2018 at 04:26:54PM -0800, Douglas Anderson wrote: > In regulator_force_disable() there was a strange loop that looked like: >=20 > while (rdev->open_count--) > regulator_disable(rdev->supply); >=20 > I'm not totally sure what the goal was for this loop, but it seems > wrong to me. If anything I think maybe we should have been looping > over our use_count, but even that might be a little strange. For now > let's just remove the code and we can add something back in if someone > can explain what's expected. This should be using use_count, what that loop is doing is dropping all the enables that the regulator being force disabled had propagated up all the enables it passed up the chain of supplies. --zGQnqpIoxlsbsOfg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlv0LlIACgkQJNaLcl1U h9BZFAf7B3sKN+Q6R7pWEpITXi4nd+st9MYfsvGgcqtgyys3MnAvGjZ/yfsjwXUD qS27/N1JBttBLJg1AN+QBVnf9b2pPAEZy0WBr7sR2nJmyvCDP8KRSYZtSBEqjosp sNSCkYDjfnrXw111dDQiixjHxmREdmLw1lD8JyfzPsEl0ekI70qtWLYY8wL/iBzS Y2ORR4VdgG4N+JFhASonLe9QGKuxbL9hLpZVMaWcCBar/J9A0Ql/kk3Izwx+vZai WbChEeX+qOK6bwFpWrOeRbeBPfuim3g3cSSWt3p2Rm4wYn/5ZCRf6isjgukoox5M JYjl6BpCcLCY/m0d8TXjgWgxreGwAg== =R/+2 -----END PGP SIGNATURE----- --zGQnqpIoxlsbsOfg--