From patchwork Tue Jan 19 08:52:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 8059191 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E615EBEEE5 for ; Tue, 19 Jan 2016 08:52:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3635D203A0 for ; Tue, 19 Jan 2016 08:52:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34CF62039E for ; Tue, 19 Jan 2016 08:52:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757579AbcASIwy (ORCPT ); Tue, 19 Jan 2016 03:52:54 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:47786 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932389AbcASIws (ORCPT ); Tue, 19 Jan 2016 03:52:48 -0500 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1600DA5ZBX7060@mailout3.samsung.com>; Tue, 19 Jan 2016 17:52:45 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 13.B7.04964.D59FD965; Tue, 19 Jan 2016 17:52:45 +0900 (KST) X-AuditID: cbfee68f-f793a6d000001364-82-569df95dedf0 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 7F.56.13906.D59FD965; Tue, 19 Jan 2016 17:52:45 +0900 (KST) Received: from samsunx.samsung ([10.113.63.54]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O1600GFDZBT0H80@mmp1.samsung.com>; Tue, 19 Jan 2016 17:52:45 +0900 (KST) From: Andi Shyti To: linux-samsung-soc@vger.kernel.org Cc: Sangbeom Kim , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Andi Shyti , Andi Shyti , Yadwinder Singh Brar Subject: [PATCH v2 2/3] clk: s2mps11: merge two for loop in one Date: Tue, 19 Jan 2016 17:52:31 +0900 Message-id: <1453193552-4761-3-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.6.4 In-reply-to: <1453193552-4761-1-git-send-email-andi.shyti@samsung.com> References: <1453193552-4761-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsWyRsSkUDf259wwgy9PzC22H3nGarH4x3Mm i9cvDC0+9txjtbi8aw6bxYzz+5gsLp5ytbi44guTxY8z3SwWc383sjpweby/0crucbmvl8nj +pJPzB47Z91l9+jbsorR4/MmuQC2KC6blNSczLLUIn27BK6Mzz/jCnrYKh7NTG1gfMfSxcjJ ISFgIrHn1i12CFtM4sK99WxdjFwcQgIrGCV+tc4HcjjAitZd0YaIL2WUWLOimx3C+cgosfv0 dbBJbAKaEk23f7CB2CICqhKf2xaAFTEL3GGSOH3+CCPIJGEBe4ldX8HqWYBq1m1tYwSxeQVc JdqPv2CEWCYnMWmCA0iYU8BN4nbPO1YQWwio5Pb/M2AjJQS2sUt8nnSfEWKOgMS3yYdYIHpl JTYdYIZ4RlLi4IobLBMYhRcwMqxiFE0tSC4oTkovMtYrTswtLs1L10vOz93ECIyC0/+e9e9g vHvA+hCjAAejEg/vC8e5YUKsiWXFlbmHGE2BNkxklhJNzgfGWl5JvKGxmZGFqYmpsZG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7pqTu1d5HIqaM7Wu34Zrd4zmGN9FjwSL31R2G579Vd5YFr1e31la9/vx6XvsQt XImlOCPRUIu5qDgRALtEDp/KAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP the driver already loops once, there is no reason to loop again for a different purpose. Merge the second loop into the first. Signed-off-by: Andi Shyti --- drivers/clk/clk-s2mps11.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index 22d4df2..cae92fc 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -202,12 +202,6 @@ static int s2mps11_clk_probe(struct platform_device *pdev) ret = -ENOMEM; goto err_reg; } - } - - for (i = 0; i < S2MPS11_CLKS_NUM; i++) { - /* Skip clocks not present on S2MPS14 */ - if (i == S2MPS11_CLK_CP && hwid == S2MPS14X) - continue; clk_table[i] = s2mps11_clks[i].clk; }