Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754885AbcDKMto (ORCPT ); Mon, 11 Apr 2016 08:49:44 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:60080 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754384AbcDKMtn (ORCPT ); Mon, 11 Apr 2016 08:49:43 -0400 Date: Mon, 11 Apr 2016 13:49:31 +0100 From: Mark Brown To: Jon Hunter Cc: Thierry Reding , Liam Girdwood , linux-kernel@vger.kernel.org, Javier Martinez Canillas Message-ID: <20160411124931.GD3351@sirena.org.uk> References: <1460038959-21592-1-git-send-email-thierry.reding@gmail.com> <570B8376.6030505@nvidia.com> <20160411114612.GD17743@ulmo.ba.sec> <570B964E.5010708@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n2Pv11Ogg/Ox8ay5" Content-Disposition: inline In-Reply-To: <570B964E.5010708@nvidia.com> X-Cookie: I invented skydiving in 1989! User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/5] regulator: core: Resolve supply earlier X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1286 Lines: 37 --n2Pv11Ogg/Ox8ay5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 11, 2016 at 01:19:26PM +0100, Jon Hunter wrote: > On 11/04/16 12:46, Thierry Reding wrote: > > Perhaps moving the locking of the regulator_list_mutex down instead > > could work. It seems to me like the first place where it would need to > > be held is set_machine_constraints(). > Yes either that or we add a variable to regulator_resolve_supply() and > regulator_dev_lookup() that indicates if the mutex is already held. No, that sort of conditional locking is horrible and error prone. > Moving the acquistion of mutex would be best/cleaner if that is ok. Yes, we need to reorganize the locking. --n2Pv11Ogg/Ox8ay5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEbBAEBCAAGBQJXC51aAAoJECTWi3JdVIfQfuMH+NYd/Q3CPfEUvg9cVLi5xr81 NkfdMiewVb7vfHun63jZp16Z9SrL4RmVd/0cQckejjr80wH8egW8adjcTOIviwTD YRSC9YOpM/VFyReNGrZHRZP9Z3Jw6oZ1BGvgYtRiKyYPkJAG9uk0TAh9fNQR5No+ GyFxnX06HaY1UzRRr+b3gQkNjg21PVZ/W+83Z72nYZ6kPFJr2vw6AzjFWoRh5K1+ HqPy4RsgIY+4abFnd048i5HYumzI2mfmtIAMPilNh8EqQ4medO0bTY2aSApf5j2I NogkShG/qxa+5I8Ge8fBiFLuZN5tq4K3MeNBf46uzk+afpaKL0C36SZ3Lp5mcQ== =J1Qy -----END PGP SIGNATURE----- --n2Pv11Ogg/Ox8ay5--