From patchwork Wed Jan 20 10:14:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Shyti X-Patchwork-Id: 8070621 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36FB59F96D for ; Wed, 20 Jan 2016 10:16:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BF7D20434 for ; Wed, 20 Jan 2016 10:16:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8301B203A5 for ; Wed, 20 Jan 2016 10:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932741AbcATKOo (ORCPT ); Wed, 20 Jan 2016 05:14:44 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:40794 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933423AbcATKOg (ORCPT ); Wed, 20 Jan 2016 05:14:36 -0500 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O1801B1ZXSAKA60@mailout2.samsung.com>; Wed, 20 Jan 2016 19:14:34 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.113]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id CE.A3.04886.A0E5F965; Wed, 20 Jan 2016 19:14:34 +0900 (KST) X-AuditID: cbfee690-f79646d000001316-e0-569f5e0a7137 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id C8.CA.09068.90E5F965; Wed, 20 Jan 2016 19:14:34 +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 <0O1800E77XS6VX80@mmp1.samsung.com>; Wed, 20 Jan 2016 19:14:33 +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 , Jaehoon Chung Subject: [PATCH v3 1/4] clk: s2mps11: merge two for loops in one Date: Wed, 20 Jan 2016 19:14:21 +0900 Message-id: <1453284864-8082-2-git-send-email-andi.shyti@samsung.com> X-Mailer: git-send-email 2.6.4 In-reply-to: <1453284864-8082-1-git-send-email-andi.shyti@samsung.com> References: <1453284864-8082-1-git-send-email-andi.shyti@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMLMWRmVeSWpSXmKPExsWyRsSkUJcrbn6YwdHFrBbbjzxjtVj84zmT xY1fbawWr18YWnzsucdqcXnXHDaLGef3MVlcPOVqcXHFFyaLH2e6WSzm/m5kdeD2eH+jld3j cl8vk8f1JZ+YPXbOusvu0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBkXXkxiKfjOWnGqbRNL A+N9li5GTg4JAROJWe8+M0HYYhIX7q1n62Lk4hASWMEo8WHLDUaYogUPZjJBJJYySlxbco4V wvnIKLFy3R12kCo2AU2Jpts/2EBsEQFVic9tC9hBipgF2pgl2o9uAdsnLOAgsXD/GrAiFqCi u/OmsoLYvAKuEh09E4DiHEDr5CQmTXAACXMKuEl8mrME7DwhoJInLfPBZkoIHGKXaOhaywwx R0Di2+RDLBC9shKbDjBDXC0pcXDFDZYJjMILGBlWMYqmFiQXFCelF5noFSfmFpfmpesl5+du YgTGxel/zybsYLx3wPoQowAHoxIPL0PzvDAh1sSy4srcQ4ymQBsmMkuJJucDo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4ZG91eFFVd1 p+1SPyP2Pqj06NSJ6h1vVpxfofr6TlysTv4zjiYn/tXvdvm9d7W8WP8v1H9R10xjx6envOUY OVXmx9qFB3ArsRRnJBpqMRcVJwIAtHm7vNICAAA= 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 Reviewed-by: Krzysztof Kozlowski --- 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 d266299..e7b97f4 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -244,12 +244,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 (!clks_init[i].name) - continue; clk_table[i] = s2mps11_clks[i].clk; }