From patchwork Tue Apr 3 10:07:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10320901 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 24AA060532 for ; Tue, 3 Apr 2018 10:09:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 232FE289C4 for ; Tue, 3 Apr 2018 10:09:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17D9E28A1A; Tue, 3 Apr 2018 10:09:33 +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 91E8D289C4 for ; Tue, 3 Apr 2018 10:09:32 +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=4B3xdFxSO3q4qLjqWgV7n6KXO/CGPCJgZphq83sr60c=; b=qPuMYyaFCE4b77nWwEFcLCuvLl GdznjCNz0MxkPD+erWHLNUOUkpu+9aUMlpAyc1za0L3gQDOzzqX8jD8Uyaxu4w/PdjSlP/kY76FtW sjGbEqOHfWpYzqJrjJaWzGrSV+1FyDf7cXQ0lb8/teiqNdugUN4lq/E2d+ZLdaFzzKeikcONk1YlE dOi1ZS1K1SmjcTKzxPWtK/cvpWTzzmQBD7GxLq55zwyX9GuFbX58nUE0WGaTQlegXy3rCFQJBZMfN Zmaz265p/eUDa2bUTcFztSdfB22Nv+IujygwnklxKEaQpY2NYY4XbN7KVGAIdvzlCQD7FZMcVfKgD E/jkwQaQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3IsW-0004PO-JS; Tue, 03 Apr 2018 10:09:24 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3Ir9-0003Ft-HB for linux-arm-kernel@lists.infradead.org; Tue, 03 Apr 2018 10:08:00 +0000 Received: by mail-pl0-x243.google.com with SMTP id k6-v6so3023010pls.5 for ; Tue, 03 Apr 2018 03:07:49 -0700 (PDT) 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=314WJSg4r3Hnm1ZhD2Iq+b6Brhom7hfuJV9r0IRRT+A=; b=k1/TyPg2deJk/g1yZVcpcseckTqNmysmHvOcNHzKQfO9TK17oDRvrvk9cQC6UtHbpE e5Rs00k5w/+3GHm1btL+DuZW6FWCD9HpimunO8rXyJxG9k88yiBpBrLnSBk4G0doAp4I pdBKcdazkR3ufRSzlVAODPHSjrIpjrz7YV75U= 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=314WJSg4r3Hnm1ZhD2Iq+b6Brhom7hfuJV9r0IRRT+A=; b=g4XJqo89O9LDBsIh0Eq2AGQ17Fbgfswr6Rdv0HPaSHD6gL93sJ5kwDoYKe4j4OpSCz 2H82C9aFTnJiNRlUWoGLWxjjh7wCwV8JNnos7AuF+y6VH85mUuYq1bbdRwonSDh2nT3L NJ7bvln4oHNm0ax/PCGPHHr+/74tcowQHL/ZleZGTM6Mtudc2TB5KBXFYrLO876zDU42 FaY78+O5vTkbWei+kC9aXr5imyX0y6yx7kXkQkq0N0yrnLFBVY/VLVNa+PgofHSVo7nn Wft+PwByVBAxYhsMrtQ/peMq59BqCEAoaVsFMmp4nYqQDpT+7yNeq5TkDgD5gVGYN/dU 5LsQ== X-Gm-Message-State: AElRT7FJ2o680VzaS7Hldtt7AQ8yPfNJNhDOdD4p8mLkOwTYY0A2qi3+ WsTDUCEE98YgUKRCgvujLuUqAg== X-Google-Smtp-Source: AIpwx4/8kgv9J58GmpssKJ1ZOA5qWS70ZdguTDeOcv6jAYgBLgxbcwvMR/Jz7awzr7SHK1//ric9xw== X-Received: by 10.99.122.22 with SMTP id v22mr8367929pgc.300.1522750068793; Tue, 03 Apr 2018 03:07:48 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id h21sm4082191pgv.57.2018.04.03.03.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 03:07:48 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Subject: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice Date: Tue, 3 Apr 2018 15:37:38 +0530 Message-Id: <442ecfd0a5bddf32c912c449b072d8a0139318fc.1522749887.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-20180403_030759_605655_A46CC89A X-CRM114-Status: GOOD ( 14.49 ) 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 , 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 scmi driver. Signed-off-by: Viresh Kumar Acked-by: Sudeep Holla --- drivers/cpufreq/scmi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index 959a1dbe3835..b4dbc77459b6 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -159,13 +159,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev); policy->driver_data = priv; - - ret = cpufreq_table_validate_and_show(policy, freq_table); - if (ret) { - dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__, - ret); - goto out_free_cpufreq_table; - } + policy->freq_table = freq_table; /* SCMI allows DVFS request for any domain from any CPU */ policy->dvfs_possible_from_any_cpu = true; @@ -179,8 +173,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) policy->fast_switch_possible = true; return 0; -out_free_cpufreq_table: - dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_priv: kfree(priv); out_free_opp: