Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4276144ybp; Mon, 7 Oct 2019 06:09:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2IOVw+kQMf7SaWq8XJHqylVCKcpFZJrhC7THnwtenE2ffT6DtH2h7z9qb9kvtyUpaIniB X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr29100130edu.70.1570453745838; Mon, 07 Oct 2019 06:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570453745; cv=none; d=google.com; s=arc-20160816; b=dl+Gh+ou6fE9C+/Ec3cnl++KxbAemN+qwsC437HJX3/xkJE2VZGqvk7jf7NawTEMs/ FKJ9VtF28HJ0hGjH5V7HCtV1UGgXoFaqisOzZVZGyfHvqrUfv8anplyAfteEplHFT7JK HW35r+KoEXt6eFjlMekDqc0Ny8gm7mlVd4nWsqXnGKVc+rfuGVvPbLKoMfAKvJ3dp1Qb QDPLmgL+B2aHrK3eACsuYaP6io3om0u5heRN3X63SBHNKUEWspMcc1nTNXjwZzM4hdR2 1/9beiceHhOY5TKEpyLv4YcT/nR7vq/3s/kH58X9rpvLR8GRCOtGq5NYqMcS/KjfQ8a/ hszQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=wiHxYuiV5ogRe/Z9rynEjd2eT8m8wC32eHirRSOjcnU=; b=JjZzwfQBunbc0A0iBlZhPqlmq7m7G+4ug/5G4k/71J7WjnnFV5O6biyergaYHPR5F8 NAT2KiQmbFYdgVHK9mvDZk2EjAcFqBzQZF7eq6KXT78HrZH4qy3NNlsNJYLnKRr6T+C3 DO09hAcEMEzpFZe4A8gscxwzKA149Xsan4Wh+Yrq0OwrIAC1Ei8ALEPZgBStWBvbRx90 C/vBbT7c3fARbVPidv1ikALPNK1HCswQSLG1tBdH50rMaPW2ImqI73RwmmcCZguuJcBR pW1m/qYZbzX29AJ4zkPrX1uuM1Bb0Bohsu67q2WgLzQFPeIEQHEnd7k1or6f9L7yRrB/ Ii7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=N0vBTOfI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si8661887edb.57.2019.10.07.06.08.40; Mon, 07 Oct 2019 06:09:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=N0vBTOfI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728382AbfJGNEE (ORCPT + 99 others); Mon, 7 Oct 2019 09:04:04 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:49320 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728034AbfJGNDX (ORCPT ); Mon, 7 Oct 2019 09:03:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=wiHxYuiV5ogRe/Z9rynEjd2eT8m8wC32eHirRSOjcnU=; b=N0vBTOfIlVw1 4+/dfwYhtMMkK8NcUORZd64J4dmbW3Di6QuCSQ5p0632APdBe/yIIFrz/I6nxiG/ER6KXfrqgck5I umdP4hwoOvUgoGmRn+sd2YttHHa0t8kMQl6NJkOKNeUG24PUB6g6+odcX3OxiOvXrr1MHXWPlkPrB vgycA=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iHSfY-0003SP-7c; Mon, 07 Oct 2019 13:03:20 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id BA9EC2741EF0; Mon, 7 Oct 2019 14:03:19 +0100 (BST) From: Mark Brown To: Axel Lin Cc: Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , Steve Twiss , Support Opensource Subject: Applied "regulator: da9062: Simplify the code iterating all regulators" to the regulator tree In-Reply-To: <20191007115009.25672-1-axel.lin@ingics.com> X-Patchwork-Hint: ignore Message-Id: <20191007130319.BA9EC2741EF0@ypsilon.sirena.org.uk> Date: Mon, 7 Oct 2019 14:03:19 +0100 (BST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch regulator: da9062: Simplify the code iterating all regulators has been applied to the regulator tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-5.5 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 151b03791e4acb09bb9a9af2a87bca1240937d6c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 7 Oct 2019 19:50:08 +0800 Subject: [PATCH] regulator: da9062: Simplify the code iterating all regulators It's more straightforward to use for statement here. Signed-off-by: Axel Lin Acked-by: Steve Twiss Link: https://lore.kernel.org/r/20191007115009.25672-1-axel.lin@ingics.com Signed-off-by: Mark Brown --- drivers/regulator/da9062-regulator.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c index 56f3f72d7707..1028db242f91 100644 --- a/drivers/regulator/da9062-regulator.c +++ b/drivers/regulator/da9062-regulator.c @@ -966,8 +966,7 @@ static int da9062_regulator_probe(struct platform_device *pdev) regulators->n_regulators = max_regulators; platform_set_drvdata(pdev, regulators); - n = 0; - while (n < regulators->n_regulators) { + for (n = 0; n < regulators->n_regulators; n++) { /* Initialise regulator structure */ regl = ®ulators->regulator[n]; regl->hw = chip; @@ -1026,8 +1025,6 @@ static int da9062_regulator_probe(struct platform_device *pdev) regl->desc.name); return PTR_ERR(regl->rdev); } - - n++; } /* LDOs overcurrent event support */ -- 2.20.1