From patchwork Mon Feb 26 05:09:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241297 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 B169260208 for ; Mon, 26 Feb 2018 05:12:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0054286F8 for ; Mon, 26 Feb 2018 05:12:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94DAC292ED; Mon, 26 Feb 2018 05:12:49 +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 12641286F8 for ; Mon, 26 Feb 2018 05:12:49 +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=Er12JWN+N3YPE0rky+hmdHwSDQalnTFMI4BhGwKduLM=; b=iDNxd51UfkMWMjAFXdJphRWYdF H75kwRnqpICo2vqbTDRUsXYNT7KZGEJcrgmKFnq/O8xfgFxQ4IYG8SDm619Ja7SABMjcUFY4H0Hdo VUDq9tdYLXGe9k/yRxt1KiNURtcIjkeCAXMcONpCwg/JvAd0i0Rj6tbE+Ym5ydULz7rlBg5CCGxc6 nW16zyeSX3mc/R8aX+b9v0j344LKGj11QIHbsfUezCBeB57z4QvO5UTXVfVZYy2TJjC8Yrqygb3Ot Kmlkhz6Oyl7d/V5uoPkEZHUG644ENkiTfZgPvMHQ1r0C7Vqm+4CpQILx7Ix6L/EZ0SFS9BD7PIM3d cOe7HlJA==; 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 1eqB5b-0002yU-FU; Mon, 26 Feb 2018 05:12:39 +0000 Received: from mail-pl0-x243.google.com ([2607:f8b0:400e:c01::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eqB3b-00017I-SK for linux-arm-kernel@lists.infradead.org; Mon, 26 Feb 2018 05:10:43 +0000 Received: by mail-pl0-x243.google.com with SMTP id k8so8651398pli.8 for ; Sun, 25 Feb 2018 21:10:25 -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=R0eRwI4CcGJHlRS6047/cUzrFodzSWOaOGrqDNWDTzA=; b=Us2MLYJocnkrEjSpTJ+w9fb9FHXTe39CU1z4wNQ9gNCeNNZKOtIQyxfh4eVruBtLkR uADx+K0iFQ0rnIsujuqx1hTV1CMb1xbKk6HomE1SrLnxcGrn5Pz+ILq2oyVs4QKbQfAW TSrrRI4SCGngvG/k4Pp605lQJ6nX7kgFNApEg= 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=R0eRwI4CcGJHlRS6047/cUzrFodzSWOaOGrqDNWDTzA=; b=ZZKAYFQBVG7oOjmHNtEE8OfaZ4zbBPVQlXfSX8XxtCrGSrDy745iNhszri5UPWYyvq ZksoF3F9mkYG1GYY9Y2+L+eJWPjfEW6vnrkaE2LHLAVFfzX1b5K+UHcPD1zQ0R3vyHB2 /n4x0hidHecLrShspQDQRZQ7F5YIluXhiQc9U8KYKpTA8vYa1bw8SFYw0h7a8OdW4UrS L61plNx5oY8RTUnscJ8DLr50VohNIK/codfiiVgLRx4/shG95OXOqjOTIdfUg5UT0GZl B5l20Gto3p+5eRgZcLCQj89S3xt58zh3VdH6KcMmUgC8AwCcaDQthXExjBRUW7R8GFAu gphQ== X-Gm-Message-State: APf1xPB3u1ItaltR7IXu0W92TzjVZqmq2qTHlKXY8Gjl8N+wpEFjJ110 UBeFAW9i3rrx2B2TnWINLqEj/Q== X-Google-Smtp-Source: AH8x227ppuudzwSZFmqfWKKWS//c0NREY1cRchBcr574YsqVeZEX+CbtE5zlMBNGexkCHM1stHvNtw== X-Received: by 2002:a17:902:9881:: with SMTP id s1-v6mr9304461plp.286.1519621825326; Sun, 25 Feb 2018 21:10:25 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id b8sm15848848pff.31.2018.02.25.21.10.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:10:24 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Sudeep Holla Subject: [PATCH 21/27] cpufreq: scpi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:39:04 +0530 Message-Id: <9a5c962bd3a225cfa87d6dcb0f6bb85697991c66.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_211036_286888_4B10DF23 X-CRM114-Status: GOOD ( 12.95 ) 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 scpi driver. Signed-off-by: Viresh Kumar Acked-by: Sudeep Holla Tested-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index c32a833e1b00..7b31efe53252 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -150,13 +150,7 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy) } 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_put_clk; - } + policy->freq_table = freq_table; /* scpi allows DVFS request for any domain from any CPU */ policy->dvfs_possible_from_any_cpu = true; @@ -170,8 +164,6 @@ static int scpi_cpufreq_init(struct cpufreq_policy *policy) policy->fast_switch_possible = false; return 0; -out_put_clk: - clk_put(priv->clk); out_free_cpufreq_table: dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table); out_free_priv: