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: 10241273 X-Patchwork-Delegate: rjw@sisk.pl 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 6D3B460208 for ; Mon, 26 Feb 2018 05:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A590292DF for ; Mon, 26 Feb 2018 05:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F256297C3; Mon, 26 Feb 2018 05:10:27 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 E8AB1292DF for ; Mon, 26 Feb 2018 05:10:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751981AbeBZFK0 (ORCPT ); Mon, 26 Feb 2018 00:10:26 -0500 Received: from mail-pl0-f65.google.com ([209.85.160.65]:42166 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbeBZFKZ (ORCPT ); Mon, 26 Feb 2018 00:10:25 -0500 Received: by mail-pl0-f65.google.com with SMTP id 31so8649712ple.9 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=cFw2vS6WWLXNzRG7gYsgBTDrKe0TtMXjhW0zRSZwDdXWxrrSiJfd6c4TggeJSJfh/v n20A3y5iPuFdfeBrxGiow/NwjWenss6KoZoGts6acvAcvaj7DolCNVh5OhJruUbGess2 bCsilGUoI+J/syBP1cBsnLcF3YTJAVvVop2cn7yg3bfkZtlx5mF+jivYJXo8GrC8iSBS V3lmIP3eZ1OPI6jT/aM/Dx/hVM7ir9NWmhwsSFY8gyfPDsm1cy+VFgYZOo9jdOk2i5D4 hoLB3U8kEG3DJg+TWqCH3R403mTUewkEuUBffR5cffXFzYO2Udsg87Px04xlY1mgewb5 a25g== X-Gm-Message-State: APf1xPAsg2RK1wo6nCYgByKkdnyPTQgYEwIzLySzOr4pOCOFfJRJhXtc to7yOYCQPyHKzICSguKqbS+aZw== 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 Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-arm-kernel@lists.infradead.org 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: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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: