From patchwork Sat Mar 4 12:22:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9603911 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 3774F604E2 for ; Sat, 4 Mar 2017 12:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2778B2843F for ; Sat, 4 Mar 2017 12:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C9D52854F; Sat, 4 Mar 2017 12:39:04 +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 0C91928497 for ; Sat, 4 Mar 2017 12:39:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751850AbdCDMjA (ORCPT ); Sat, 4 Mar 2017 07:39:00 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34493 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbdCDMi5 (ORCPT ); Sat, 4 Mar 2017 07:38:57 -0500 Received: by mail-wr0-f194.google.com with SMTP id u48so16254061wrc.1 for ; Sat, 04 Mar 2017 04:38:18 -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=dH9biJduF7SqM4M5g4Q+BCObbZ5K40wsfzhfPNI6FIM=; b=UigI1/TUjtdskZbCWHSOrW02xc0wkJsrPiOTqgiLTKbsWOESAn6HbH2+cdYw4sh67o MjyvkowUU51Et47jDThPkM6NjbBq8Qvh2nlBk/pYoiXs8jqd6n8Y/tkW+R6xGbEBW10n VlxhlVhRpifvhemh2sLuW9wTdIsHw3Pmus0885n00ugLsUH0PRdz1mzdkr8rL1+a1pIk WRuOOcoqi6Z3K5bztL7ucE6hAXmVzI0G+nI2OZlBLlBHABwchjfVYG/qymvVUGmnq9QT mLpQF2+IDgG5HyGZw3ZLQkMQjC3+FtrjIQ2jq9SmCiZlSTrrAovqQgv6i6jazi2tTbuZ dSyA== 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=dH9biJduF7SqM4M5g4Q+BCObbZ5K40wsfzhfPNI6FIM=; b=U+sWDR1J7XPrdS2k2id/dlgkwEtZLA7++OpK4z1P5GVmfjuP9am6/BBJf/p3TSwHF3 uvda5ZxTetFVQWhsKEDSgXj1Se8aqb57NKFpSSR6Du+Di4pMHeWQO5/YUYi53IkCS65D YRDJDPnVuaHSu56nj5rEdwRefIp30J5iaCQ18s75yIR/krSzNk2IQIRiNXrAkbG+fGjG DuyALFt95UqiJYa8ZxzJhc8reobw2TYeOcngEW3uDpEucJQgcOGphOWZXSbhVeSKFte2 6FdEyOBeKuZCVGHse/sQcrTijRwefNqFcoHSWqKHxmN56p4zWbkIm9WD6H8OO0PtIK+E SSIA== X-Gm-Message-State: AMke39mTBht8/qV8WCEi95+/RYwMZ3b5UhFC4TrPYOF7aRtSP14i7nLP6JytsB7hBP3C6g== X-Received: by 10.223.169.45 with SMTP id u42mr6523501wrc.187.1488631097287; Sat, 04 Mar 2017 04:38:17 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:98cd:c51c:6f4e:443? (p200300C6EBDC400098CDC51C6F4E0443.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:98cd:c51c:6f4e:443]) by smtp.googlemail.com with ESMTPSA id c9sm6891508wmf.18.2017.03.04.04.38.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2017 04:38:16 -0800 (PST) Subject: [PATCH v5 4/10] mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init To: Ulf Hansson , Kevin Hilman References: Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org From: Heiner Kallweit Message-ID: <2fd2f059-df21-dc55-48b8-debb923ebf37@gmail.com> Date: Sat, 4 Mar 2017 13:22:57 +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: 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 v5: - 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;