From patchwork Mon Feb 26 05:08:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241289 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 25F9960208 for ; Mon, 26 Feb 2018 05:11:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 159C0292DF for ; Mon, 26 Feb 2018 05:11:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A27C297C3; Mon, 26 Feb 2018 05:11:13 +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_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 93BAA292DF for ; Mon, 26 Feb 2018 05:11:12 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0bgCy44lssVwI3+6utLQ+6VAnweHEpqbvY+CdIL7QIg=; b=RmPJOOfyhkqi2XXclscHyxPIuv 8Pi0PxTzN/U3yUCr03iDLJLl+QyspLgkzNc1NDLwOaTZiqjLyL0TcvuiQi7TuI1zJWACle1BZxqnU tVFgFksmKguNF73QT+LTTW2W8mpEhkyrlUcyIBJRGs9pdCHTIegrj/vd4zN0qhejCXW+6fcequZ3y 4xwBvYyacGchwUULyvob/xNxaWKaXC7zHJZMsErCA4OGAUeMbAcEWe1ESY/+C8ADCjoLXy/NXR0b2 hMNBRg/vtdU6RxqoH9YtOUyds72WMSr9uc0dOAmMSSLhjR07/fbdg1mTvn3J5bC5b7LYmD9oiyInc HmOTnLAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eqB3z-0001wk-BB; Mon, 26 Feb 2018 05:10:59 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqB3E-0008Ul-42 for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2018 05:10:17 +0000 Received: by mail-pg0-x243.google.com with SMTP id l24so5781971pgc.5 for ; Sun, 25 Feb 2018 21:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=7QGZw8xY1AzKmWeZQrfRD07I9AonUp4Z/GOKO/Ikvbw=; b=eCPtDp91vBN5ijuIryNZwCbBFf2J+afAvNmlf45rtxRWtzvHTTgCj/CGv32rD311Ph xGYtsF3lJ6v2o7ZqAwbGAhGt+NKVEuwFjUzs6D/vk9lyu0h36Qaxzw6jq79LO8FIqUVy tIHNZdR27ubCqZJ0T0URx1Gs9hqMs0OB+kOjw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=7QGZw8xY1AzKmWeZQrfRD07I9AonUp4Z/GOKO/Ikvbw=; b=aqB8vexJd0vMhFI5mqS7mF9h/iIDraXMAIJBXBD8dTVllJjZ6/z1kCNW+mUGAoXdxL HD2i66l2omSzd/wnzzPALDn3wL7y5Y/1tArOmVEq1dSg3DrdHh5eVPyA7y9P41A3/6r2 EltkzEVHuEQzGl9MO1D9JcvDOgv2abmLJnxzfICZoP6ehbHFjHafHqYkbrr2HC4mcLY5 RdU7nZth8bAtjtFzR859J/15d1OE9Qq5xDtyur9O+Vo9LLCU5WVsmAUbKDEteSgsC09V 9bW4gjx3Rvr+mCOXGznX8Xqy+OKkoh8it4jdXbF+bijw+VfuPm8K9Uh2TsFvMDTfgqEc MIvw== X-Gm-Message-State: APf1xPCJU03Y6SzL4BUYr/nHrgEndfEO3TGdQdobdp0aOBUg93nJDRVk hV9YI3RbhHjBSclrnpACjWYEPQ== X-Google-Smtp-Source: AH8x224ps6f2GDg83IaQQ/oUrhUtOW1Ii4I/oCgJHiYszS0n73kbFdIFFOEdOQAZeFVO07Wv4dQ3JA== X-Received: by 10.101.101.78 with SMTP id a14mr7406828pgw.368.1519621801018; Sun, 25 Feb 2018 21:10:01 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id i125sm6740325pfe.176.2018.02.25.21.10.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:00 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Matthias Brugger Subject: [PATCH 12/27] cpufreq: mediatek: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:55 +0530 Message-Id: <19a79fac3ea680f23690e4d995539f4b21213275.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180225_211012_722977_B1F2DF59 X-CRM114-Status: GOOD ( 12.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Viresh Kumar , linux-mediatek@lists.infradead.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The cpufreq core is already validating the CPU frequency table after calling the ->init() callback of the cpufreq drivers and the drivers don't need to do the same anymore. Though they need to set the policy->freq_table field directly from the ->init() callback now. Stop validating the frequency table from mediatek driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/mediatek-cpufreq.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c index 84d658d57029..eb8920d39818 100644 --- a/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c @@ -460,21 +460,12 @@ static int mtk_cpufreq_init(struct cpufreq_policy *policy) return ret; } - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - pr_err("%s: invalid frequency table: %d\n", __func__, ret); - goto out_free_cpufreq_table; - } - cpumask_copy(policy->cpus, &info->cpus); + policy->freq_table = freq_table; policy->driver_data = info; policy->clk = info->cpu_clk; return 0; - -out_free_cpufreq_table: - dev_pm_opp_free_cpufreq_table(info->cpu_dev, &freq_table); - return ret; } static int mtk_cpufreq_exit(struct cpufreq_policy *policy)