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: 10241291 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 3F6AE60208 for ; Mon, 26 Feb 2018 05:11:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DEB3292DF for ; Mon, 26 Feb 2018 05:11:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CFA6297C3; Mon, 26 Feb 2018 05:11:35 +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 A063A292DF for ; Mon, 26 Feb 2018 05:11:34 +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=CvnY1fXkXLBwOs3GaW1H0w/3oBuAwXh0fVvl3n5t+B4=; b=lOpRQ25aBWrHk3M3o7lEoleN6+ 6t3BErstXCd89CFP4zVX4Z/SHK8hhlcEnyBnyXadxG8eGNRyj7cJ8nQn6tGyQLE4yea4uiWu+3D7I ngNGYmDZEuiFytP7DqBv53HXjOE/P9tUrhF8C9LuAKHU9lR/I/YSSATmdkKcTEaz7MOwhW8yIvtPl 2Odvo6zmhNcdDrT2FwVMWPgoAK4uMsBCkVhW86M9dFFvfSqFhgRP0T7CNeKr4XvsW2tfutc99P/pr Mom0hrh3UcIS6qZf1YzSfZDPfG2FqJi4h53Nw4dP4JL3oNHT6VlIBv06fhJmz3Nsgm6siSOuKsPHA 001FIVIw==; 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 1eqB4V-0002LH-DZ; Mon, 26 Feb 2018 05:11:31 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqB3E-0008Um-A4 for linux-mediatek@lists.infradead.org; Mon, 26 Feb 2018 05:10:18 +0000 Received: by mail-pg0-x244.google.com with SMTP id w17so5776267pgv.6 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=Tm2SCoExSyKX4tD6wCBkksKuZYUahysHRR2MaVNpRq7En5m0T1hJDbwWGFlQeblRCO bSTkaWY25x4wxYMTXXqe9Rs0L/uP4osXj1fqihlRrjEvhg6H1BQ647wFf/GsZpk0eSZp pHtg1AsDVK7WIe40K2T2LyMf2FX+ayJIxOTDKg2kogjjoMn2IAYQiuQJquZ/YdKHJPFF 6shBFQDptb4jCm78/7JRu/eZHZYUO+vtBbIVcxNDRf2d/OvtRq8XQBgRq4wWx2wwHHW7 8MhC1N/sZ+KFOlNKpM5/1mX5TbBzm0PMh1Q+LmkFI/GG5IbDdaMnpJFOU+vCpIrIq3Ff NdGw== X-Gm-Message-State: APf1xPCMk5Pt7Y9rPFw7J8XydnnybzytlEsN8GJvNbuBMSC5EOauM2Xl LWNbcuuTGl8Y37u2DnIMUVIpLw== 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_843295_5AACC36A X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=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)