Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbdFMKQH (ORCPT ); Tue, 13 Jun 2017 06:16:07 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:45106 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752522AbdFMKQG (ORCPT ); Tue, 13 Jun 2017 06:16:06 -0400 Date: Tue, 13 Jun 2017 11:15:56 +0100 From: Mark Brown To: Charles Keepax Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Message-ID: <20170613101556.7xrzohow27dujwv4@sirena.org.uk> References: <1497280672-24011-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <20170612163856.vctl42rg674r72bj@sirena.org.uk> <20170613080731.GB28618@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="prjz5xupzemhvn6k" Content-Disposition: inline In-Reply-To: <20170613080731.GB28618@localhost.localdomain> X-Cookie: dpkg has bugs? no way! User-Agent: NeoMutt/20170306 (1.8.0) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 39 --prjz5xupzemhvn6k Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jun 13, 2017 at 09:07:31AM +0100, Charles Keepax wrote: > On Mon, Jun 12, 2017 at 05:38:56PM +0100, Mark Brown wrote: > > On Mon, Jun 12, 2017 at 04:17:52PM +0100, Charles Keepax wrote: > > > r = regulator_lookup_by_name(supply); > > > - if (r) > > > - return r; > > Why have you left the lookup here? > Yeah was thinking that could maybe use a comment, if we don't > find a match in the following loop over the supply map then we > will exit with the regulator found here. So we can still use the > regulator name for lookup just we default to the supply map. Why are we even doing the lookup here if we only use it if we fail to find a supply mapping? --prjz5xupzemhvn6k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlk/u1wACgkQJNaLcl1U h9C6xgf/SaYJIXUQPTYsjy90bLDXXbzFQ6QVBS03veh6FSlg80uIEBxQzJHq4qnz j+fi9UILQfUtlzjRkTTXHKxifOf5dtgMb3BpJuc8IZi5dPK6kPWTsjAaLuBFo1Cb 4AxT5TePo7r7Fjqd2uctYKk8xuYKdyyqbLHtft//3qBDu2h+H26AOHbj/cOzUczI 5Mmowpd5XwjUpkx4d57lBqVSQEdxtj4wNZFhXFmnySXEZXeLzN5hzDzHh/3RV/kU 8RTqdT8iuEnb451MOfpktwXFYAauQanL9Lf62U/CyDk7HGfe8JVXS4DXj/v7/A1j 8FtjzDjA/walg3hDLwM03j2w8AnC4Q== =kPQo -----END PGP SIGNATURE----- --prjz5xupzemhvn6k--