From patchwork Fri Mar 3 19:54:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9603423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6110160414 for ; Fri, 3 Mar 2017 20:00:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5331D28633 for ; Fri, 3 Mar 2017 20:00:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 461FF28631; Fri, 3 Mar 2017 20:00:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E97BC28631 for ; Fri, 3 Mar 2017 20:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbdCCUAp (ORCPT ); Fri, 3 Mar 2017 15:00:45 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32906 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751842AbdCCUAp (ORCPT ); Fri, 3 Mar 2017 15:00:45 -0500 Received: by mail-wm0-f65.google.com with SMTP id n11so4726423wma.0 for ; Fri, 03 Mar 2017 12:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=WKU8dcXQJ2ed8PGBqIYTZxfUbs8A5typB47opSYoFSA=; b=hApg9ICBmlKcGQAj2jTKMEgODZoIywRhHZT04TXj4rihTGOU5C4/iNFDs9g+Rer0EN TLM2RD2LoLm2ZPxRWXZ3uQ1TEdNlbDIuFSxIk/97nDNxSLCUy9F2m/RGu9KXbItT3tAp Enq9Q8BiuN1RQ0fwM3v3RwiiJsR2sbiFdBZDWXdF7Vq6RFmajxmqYdeQa7ytAdQ+V61T J0T8kpUpQ2+0l5/X5SDFRspABMMj95UuobF2kMSr57m5x5QIzmBnh4zkg8sjOU/n/rpw ERVO4zjx1TriJ8TnWsgn1nVkcl0LvQVVlUVhhKRpRKHwo1KMiilVBekrkD1/AKQEgKWF Bihg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=WKU8dcXQJ2ed8PGBqIYTZxfUbs8A5typB47opSYoFSA=; b=DS2fVcIJan7rj5uMH5N2pyj9ZPzAfQe78yJAK0TzFE0kG+0r03FHocyuLK9/cDcsWa pborEAhvuCBgA5rml2ox1fK2SXlZoqG/+7nEyJtaa88KvjthJv+4CUAZbJQYyIxTdh+j mCWaL0gPG68phCV8Z2vSvHUdFyEbchR9k6FMkZgEb7wfKoJYkq0eQMucFvMQy4dZPg4y 1qSK/BPM1KaaYoDWGjDUig3eqF/UrTc0YQcplmNQ3Hp2DVM2y0gXWrOPocmL82TBt4mJ XiLuIaN55XQ3f3XNsm8iSZd1MCliKarfNoxpctxZNtT/M6lpIhiZlFVe8Mi6ucBWxu0r nhug== X-Gm-Message-State: AMke39nvdjc5hwxckI0SHafIK2agr+h3EfJfXV8kdM8imf/ndOGaNw7ufmjFwG48LIdT/w== X-Received: by 10.28.84.18 with SMTP id i18mr4345949wmb.130.1488571243209; Fri, 03 Mar 2017 12:00:43 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:f903:fe11:afad:80a0? (p200300C6EBDC4000F903FE11AFAD80A0.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:f903:fe11:afad:80a0]) by smtp.googlemail.com with ESMTPSA id 63sm16457079wrh.68.2017.03.03.12.00.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 12:00:42 -0800 (PST) Subject: [PATCH v4 4/10] mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init To: Ulf Hansson , Kevin Hilman References: <62912f3d-2307-cfff-3c69-c8b8ffaeb474@gmail.com> Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org From: Heiner Kallweit Message-ID: <2eb59c3b-5444-f399-4597-e0fb872b6251@gmail.com> Date: Fri, 3 Mar 2017 20:54:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <62912f3d-2307-cfff-3c69-c8b8ffaeb474@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Because the DT requires a fixed number of mux parent clocks, variable mux_parent_count can be replaced with constant MUX_CLK_NUM_PARENTS, so remove it. Signed-off-by: Heiner Kallweit Acked-by: Kevin Hilman --- v2: - adjusted commit message - added acked-by v3: - no changes v4: - no changes --- drivers/mmc/host/meson-gx-mmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index b9de3d47..ea2db3ce 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -242,7 +242,6 @@ static int meson_mmc_clk_init(struct meson_host *host) char clk_name[32]; int i, ret = 0; const char *mux_parent_names[MUX_CLK_NUM_PARENTS]; - unsigned int mux_parent_count = 0; const char *clk_div_parents[1]; u32 clk_reg, cfg; @@ -261,7 +260,6 @@ static int meson_mmc_clk_init(struct meson_host *host) } mux_parent_names[i] = __clk_get_name(host->mux_parent[i]); - mux_parent_count++; } /* create the mux */ @@ -270,7 +268,7 @@ static int meson_mmc_clk_init(struct meson_host *host) init.ops = &clk_mux_ops; init.flags = 0; init.parent_names = mux_parent_names; - init.num_parents = mux_parent_count; + init.num_parents = MUX_CLK_NUM_PARENTS; host->mux.reg = host->regs + SD_EMMC_CLOCK; host->mux.shift = CLK_SRC_SHIFT;