From patchwork Sat Feb 18 13:08:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9581071 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 50F78604A4 for ; Sat, 18 Feb 2017 13:27:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4255A28236 for ; Sat, 18 Feb 2017 13:27:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37032283EC; Sat, 18 Feb 2017 13:27:16 +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 E307A28236 for ; Sat, 18 Feb 2017 13:27:15 +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:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nve8Zgcihhz9oVKSD2gmRwQmycqHeBCNVz8Ys7FRNNk=; b=cucggXVOkJDO8T W7R8thy8UZ/h+rqWqHNZxihYR+XVeOvdbQtZHt0sAMZNlEKS94ZC9F9Po0tXGu/JoKmuUrrHZ7BT1 cQrt4vLctTJIA66wPQtmP9cd4bfyyG4LgJaBaErWolFTuntm+TpbaAaDCG9puxN0ggv6QODCvCkIA xYJA8cOkbvn/GZQIboRe236dgJxhhuCGSJg8vU8AU4FqoJC40Nk3pBQ8ZqOqLfblRaueSbabXXRzM iMXMukaw3ruIYrkbS7SXkNu8nfreG1R0yRgvHJHAudt689m3+hfiXIgFMyGIImYd5VDmupNeFhJWL lzJH25GmOYzXSUcSrvXA==; 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 1cf52c-0001AO-Vr; Sat, 18 Feb 2017 13:27:11 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cf52Q-0000tG-4j for linux-amlogic@lists.infradead.org; Sat, 18 Feb 2017 13:27:00 +0000 Received: by mail-wm0-x244.google.com with SMTP id v77so6860081wmv.0 for ; Sat, 18 Feb 2017 05:26:37 -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=UwmrUyx2OnWgkSshv3zh/k12Lp1R8BKUBvI+oT0v38I=; b=jzyi8Cfsv8EWRcF4nufacI/3ny9RuezaMJylg1aev/7V3LMBiaqGbi+PchyFM8nXsv 208aE/T4UyWrFI4J8p07hKoDfCoidpOHnhdk5xmOpiXk7TweBUuiAxGJHrN4D/L/0gqi fpWuYZQEVFhHSkrkpO0nPRvqsMG2oICs/oSIK/gKg0MWxfpMQePFLEYflXjdN9MSCc3O PzIQVWPcuydwt6Oc0zQtFBYty9juofNGgWxYb9A3HPvYuhgVq7q1xLBaEVCdK1xZ7Qxa s47FvkwYEv2AXQQdzPxo0qCK6OSuKQx3YwuQf4cFpH/dtkDi/riumYHx54wuAWieog6g OOTA== 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=UwmrUyx2OnWgkSshv3zh/k12Lp1R8BKUBvI+oT0v38I=; b=g/L5vk9ud9t1iAIWkFi5oMW+Vvq871ygGrR3RPn/pBGr5qb4bouH7fFCwKU4x+UQoo HL/s13LyyTvmFNKnYjyUrMwUTHsLo0rU3mlNhXACm0xdssaWePWHwiKwMl2rYFYjr8vr vgpe4HaUqxcLSIJqEHWvlbUceyxbPO5k91kCgPpOWdOIe77cClBFC+hkFcKL+irpwXDo fIEhByK2wfGHOWnzXuEC8bfbRdIylfSaULEqIVpMmibRXAKR2vh1ZdAjG4J9MZfKzK6I 6pXxk+5P+xVPZGDWJhVz0Rtv/Vpts+nrdrTtZcvl/4tNF9ekbAyeomFB55maJ9CrcIQK NI/g== X-Gm-Message-State: AMke39kX33KHVsUbMir0E1cAqZhp09nZZgjsKndRx/jXl3kT9xa69XSiLKSwWziot1czaA== X-Received: by 10.28.45.213 with SMTP id t204mr9300281wmt.113.1487424396119; Sat, 18 Feb 2017 05:26:36 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:7c19:f774:dabe:f95d? (p200300C6EBDC40007C19F774DABEF95D.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:7c19:f774:dabe:f95d]) by smtp.googlemail.com with ESMTPSA id y97sm5651909wmh.24.2017.02.18.05.26.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Feb 2017 05:26:35 -0800 (PST) Subject: [PATCH v3 4/10] mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init To: Ulf Hansson , Kevin Hilman References: <583f6496-68a9-b8e1-6b25-1f073f819a3c@gmail.com> From: Heiner Kallweit Message-ID: <94e1a544-c24d-2e19-7971-731bac6aa29b@gmail.com> Date: Sat, 18 Feb 2017 14:08:45 +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: <583f6496-68a9-b8e1-6b25-1f073f819a3c@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170218_052658_496571_BC4B6C92 X-CRM114-Status: UNSURE ( 7.22 ) 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 v3: - 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;