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: 9578235 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 B458460209 for ; Thu, 16 Feb 2017 19:43:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A86202866A for ; Thu, 16 Feb 2017 19:43:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D6B42866D; Thu, 16 Feb 2017 19:43:09 +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 45F2F2866A for ; Thu, 16 Feb 2017 19:43:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097AbdBPTnI (ORCPT ); Thu, 16 Feb 2017 14:43:08 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33621 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933121AbdBPTnH (ORCPT ); Thu, 16 Feb 2017 14:43:07 -0500 Received: by mail-wm0-f65.google.com with SMTP id v77so4689974wmv.0 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=bmYZzbrFgKdGkEPjxq38lOseH9Ev2WeKPrpVdkYQncp9EkGwtfz4pf7VedxkBTZol3 5Vn/3IjulGnNWgZWsTacb86Q80UxzGUGv88UgHRlPf6f3Qw5bC088sXG0b/yYchGuB5x cxX4nOlUPAVow0St369sVn8zTPWluZnktQ1P9aB1ZVJd5J0pbS1WeUc2hZHTPG8hvEx1 Ypkj4kSuYWqEHRmS455/Hz8jzTIWq0U246v9AjlLTGtQbXJQo5RekRDuGwVJzFmwmZM0 xqyGixjVrNd+wYRkEM3An6kt3TQgyZEAoQWdfQYNYlLTw5BcY1ehYRa4wO6PYTW26KuN D8yQ== X-Gm-Message-State: AMke39l5QdAs+5QJQnzoFXk5PSnFRXuaW2bGpo4DOLVn7QTvSWaNCSP5UMQuhFWkFsyUoA== 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> Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org 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> 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 --- 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;