Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752096AbdFMIGX (ORCPT ); Tue, 13 Jun 2017 04:06:23 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:33758 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751831AbdFMIGU (ORCPT ); Tue, 13 Jun 2017 04:06:20 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Date: Tue, 13 Jun 2017 09:07:31 +0100 From: Charles Keepax To: Mark Brown CC: , , Subject: Re: [PATCH] regulator: core: Prioritise consumer mappings over regulator name Message-ID: <20170613080731.GB28618@localhost.localdomain> References: <1497280672-24011-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <20170612163856.vctl42rg674r72bj@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170612163856.vctl42rg674r72bj@sirena.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706130142 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 512 Lines: 16 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. Thanks, Charles