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: 9581083 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 B66FA60586 for ; Sat, 18 Feb 2017 13:27:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5D9F283EC for ; Sat, 18 Feb 2017 13:27:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97C4B283F3; Sat, 18 Feb 2017 13:27:20 +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 F0588283EC for ; Sat, 18 Feb 2017 13:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752971AbdBRN1S (ORCPT ); Sat, 18 Feb 2017 08:27:18 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36738 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312AbdBRN1O (ORCPT ); Sat, 18 Feb 2017 08:27:14 -0500 Received: by mail-wm0-f67.google.com with SMTP id r18so6863993wmd.3 for ; Sat, 18 Feb 2017 05:26:36 -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=acUs6SK6276qAAW/5yVacP8hrtn4DZHEQhDNA7tlmwgmVcPoPxhH5eZXhPh5FCjCv4 ZHMbjRu6fXPB4ZWR5j9HRhE44URW2/dp1L6CGF7K2OhtDJ6EeisOrZJUhBubFfJmiAzX YgAFKxPltfOxUkybUJQkCd1bRUAs2bUZpawgVvh/y/e3RYP2+xjDGnVMsZmGbkyqQPow 9N/RpDUbj7AYCYva6CXfqgkfXSPsloSMrU1aREACHxY2OSYhuu0tmTrqnpWcmQdpdnOh iVgPYbVeNC2EF0oJf/38bSEW5Im9nfJhoHwfPgU6MCFtyruNsh5jieWz83mnzg8qJ+yN kVBA== X-Gm-Message-State: AMke39n/dfV0/Q6dYG3b7RPsinXDox+UrEWwfdqP1f6P8Pd/lqqpiQqzcdj2A0O2DWc4Yg== 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> Cc: "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org 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> 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 --- 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;