From patchwork Thu Feb 16 19:41:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9578249 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 E947060209 for ; Thu, 16 Feb 2017 19:43:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD9752866A for ; Thu, 16 Feb 2017 19:43:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D23432866D; Thu, 16 Feb 2017 19:43:43 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9597F2866A for ; Thu, 16 Feb 2017 19:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:Subject:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=up8WdpZkyw5u0NCvHv5QElyvfFk3qcw7a7qATqj/0DQ=; b=b+jekSiigF6qQo jH3j3Uqw6nSTSEdn9VQ1/Jd1cUxNoFVBY4L7qQQp+/MfSlyWEF1E2MUdZenA+EmreF8MGZLyCwBhi hLz2vQXg6CVsSR2QgjUDdfX+xf9l8/JUH5fDDVBfxDQKX6cVMzytC+XNEmNQqQj+79w55uQTCivoQ ngniZnif/SW4GVqeGXAo33U+L76AZ0iHrjJjOYmlRwFz5htnDxU78/ZXrZPmyQjUZOJLTfnn1K77p iE3R/sjSsGqBFhbKKGS7XDAnbEXcn75madZPG4p7DmDfBhPZEMOnHY2GjKO33EQk8ZFjX7k9+9vqH 5sjovhoP7qW4l/ce19oA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ceRxh-0006jC-Md; Thu, 16 Feb 2017 19:43:29 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceRxb-0006fF-I9 for linux-amlogic@lists.infradead.org; Thu, 16 Feb 2017 19:43:25 +0000 Received: by mail-wm0-x241.google.com with SMTP id r18so4677029wmd.3 for ; Thu, 16 Feb 2017 11:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=e+Ya+84IqK4gP4EhvOJIgK9W1hvWoU8bG38KgT/IYfk=; b=dDQHhMRBELSk60Zq3tM1C7p4hSjDtFcZsgMEz+vL+50y7LJdmkYGNlbk1BTgf8iwf2 cHpJK4eM71WWKBI7ahK63UGSu7A6d+EPFgT+Q6LzEfFNB9m2bTxfRnXjX76VNDESWX/2 3B2jMqMDFR+qkdPy+JE2oh7IoZb+5xwTPVKc/W4I0c4onfloJAkArCVmFEklP088w7mO PvDskd10NE8xQNhOjQz3xSijsADkL4t/1ExLXIMm5qzmjRfxU5LETD6doPNYS2p34aZ9 BS07uoRqDyQmA9nQr7c7F4xjGkwB44JsozD+ZhPglEvDEoSV7cLxLZwnK6U0+lSTXMqU ZeWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=e+Ya+84IqK4gP4EhvOJIgK9W1hvWoU8bG38KgT/IYfk=; b=OVZ5pYNMF36v6suySy+OC8pOdbsMc994Q033haq3NEKBDWTV+luCHnacvpRQdjSK4+ tCGGOL6AfviPhSTScthMps2ZvCxasRfYJu+nogZIQteSG6NtOxm+pb8d+FiSNLqE4Pbu XxDIW5WPIcyZqHuY3sxAex6UlxmhAsul+aFzqtnbp3RkeIP5CQ+zVxD82IImzEDwhw3s LPkL6nFbwxLgoFxzvU/+XfqTih7a9XX+aA+mW52DrGozxzEsr1yK2ovNJGUAJeUOnxyN qfAjrfUFzEKjeXWzrmPM0/yV0ybiaqnM+jAoZjJbw/436eWr6/UxGBAQ3jjrMrMU7ypR RmfA== X-Gm-Message-State: AMke39nOwz7z7dPgLAChxtJtUx57Wxphi0Ygetoqgf2/vU3viDZdfuKgpE+i+YW2DDUVDA== X-Received: by 10.28.134.67 with SMTP id i64mr3669949wmd.5.1487274186539; Thu, 16 Feb 2017 11:43:06 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:f02a:ffb3:d41d:abac? (p200300C6EBDC4000F02AFFB3D41DABAC.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:f02a:ffb3:d41d:abac]) by smtp.googlemail.com with ESMTPSA id d29sm1401564wmi.19.2017.02.16.11.43.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 11:43:06 -0800 (PST) From: Heiner Kallweit Subject: [PATCH v2 4/9] mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init To: Ulf Hansson , Kevin Hilman References: <7d5263e2-9325-dedb-a5f6-954c4a09e977@gmail.com> Message-ID: <2bb20447-d932-0ffe-e976-ca16d28154dd@gmail.com> Date: Thu, 16 Feb 2017 20:41:30 +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: <7d5263e2-9325-dedb-a5f6-954c4a09e977@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170216_114323_805533_A00F3DAD X-CRM114-Status: UNSURE ( 7.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, "linux-mmc@vger.kernel.org" Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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 --- 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;