Message ID | 8c69a1611f395d02f2bf53cca5fba7f1007059cc.1519620578.git.viresh.kumar@linaro.org |
---|---|
State | Accepted |
Commit | 0d105394450796d61d78fa04cc4445d201a3b976 |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230307lja; Sun, 25 Feb 2018 21:09:52 -0800 (PST) X-Google-Smtp-Source: AH8x224sJHuSn4TNembD3JxajUpN7skSz8uQLZoF+KSl+v3lF0sHwN7C+Sg1PHJoKAowPAGaJveT X-Received: by 10.98.82.138 with SMTP id g132mr9449473pfb.120.1519621792257; Sun, 25 Feb 2018 21:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621792; cv=none; d=google.com; s=arc-20160816; b=pY+42ijfHEqSRzST68VGUOZj2WTCXvlWiSDPlEkpWHMgm9KPM3zqpZhhGPvEBPEMYC kroLrDhUZ/PFWd30N7NsFe/e0t6lW6xNz17qNe+dqEZgnLow+6JM2dF4s8mWBhwo/3x0 MC0KeUXvDCdiBMtoAq4RtXU/rYvlDZGnkcY/I8/3L2h7OKU3HVUXiJElDtymUzuB2O3p a4trXajuqPAF6e0M16CZWuD3YSssYyOWhTpvM6z2AMQYr9Zz2B4erAyXEa9FKr+nJtR+ h3YZ4Tfg2fZRTaqqYU72oyLaJPz8TOOkEVw7i5oOvpMXw0Tna68LA7NLhcaTw/T9C1lP 4nug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=qPzThHrNh1aDCRcksOu0z7DWxooaWC0cy7L2AU409xpFrMYLHniuuc981cY6XJh3TG EXz0XzQKGxm1Okry1PBVBLbLZKFXaOdB7ypFpO7xFx8ItzWLpRmuMLtuIpodQFVgy26z v8PBXBiZrKsTFy7mDhbhFmUphPxyWjNKH6tZ/mJfLFCdoQuIGgTOFxrnaFILz1yO2Pn4 FTqV3/CCjWFXt9plqX3ukY916IyiMxxuXCct9MAlzfhGLbwV819gDVOH/OM7YQRLWESm xSJf8BD2tvDdCQa/EWklu44K6Av2pDxspJiuBYMEnG5vmBZeW2YQWlemiSRXIylRHnzD M2uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eNjFPzdf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-pm-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h32-v6si6199354pld.217.2018.02.25.21.09.51; Sun, 25 Feb 2018 21:09:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eNjFPzdf; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751796AbeBZFJv (ORCPT <rfc822;thara.gopinath@linaro.org> + 11 others); Mon, 26 Feb 2018 00:09:51 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:35059 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJu (ORCPT <rfc822;linux-pm@vger.kernel.org>); Mon, 26 Feb 2018 00:09:50 -0500 Received: by mail-pl0-f68.google.com with SMTP id bb3so8659840plb.2 for <linux-pm@vger.kernel.org>; Sun, 25 Feb 2018 21:09:50 -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=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=eNjFPzdfIkQ5aQuJ78O1GgEvsThfgpFd9YlW21Dco+pjVj+VIa9PukKLQ3YmdmsAdo bbh+N5CHHOGwYyvFCCmToDccZ7ZF9ieVXnhamOOlvFspa5x+udmzK8bxgbM9j+4dfDm6 vpT4/nlzPExYenkBESi07LaW2ZJzuizXZAlfY= 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=QB3U3wNTRzX+nNCSEUoo+x9xxg5FbU24KRQPrR0oTGQ=; b=UMCpqmeodJdoFtUj7YyUKmrLghcaHN80t5NCOhOV7Mm44V16J6xExkG3KLqw9nzx38 cPP2CsFBtY1jyxTCZQp9pIfo9Vj6ymURXMftkQP6MKPhOWBinlfMCdfmcwWnMf+jXtxc Mf3DpgY8QR5/IGP0xomqwzBHu2m8GZWpOOwGag8eOW59uSRcQblR/zn15wSiAGVcbIsY 2ygyQIf/AB072E+/e9S70cfzR8HuWuQf/h5Qt+GUJeObAZoYLaXjKESAGAKzk0o0/h7K d/lQGF0pu1ORjYBHu5apgGDLJkheRbSBgSA6pW7VyDl1KbuNgc7yCgLw56Gghq0mgj56 qMUA== X-Gm-Message-State: APf1xPBNQgyeu4i8Sb+NtB8u5przpWQu/1aTCLnM4quLnxE7XF4OALb6 AroBxYr/TD6npRSczUd28dMfvGIUZZ4= X-Received: by 2002:a17:902:7844:: with SMTP id e4-v6mr9130786pln.83.1519621790273; Sun, 25 Feb 2018 21:09:50 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id a87sm16221323pfj.13.2018.02.25.21.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:49 -0800 (PST) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org>, linux-pm@vger.kernel.org, Vincent Guittot <vincent.guittot@linaro.org> Subject: [PATCH 08/27] cpufreq: e_powersaver: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:51 +0530 Message-Id: <8c69a1611f395d02f2bf53cca5fba7f1007059cc.1519620578.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 In-Reply-To: <cover.1519620578.git.viresh.kumar@linaro.org> References: <cover.1519620578.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1519620578.git.viresh.kumar@linaro.org> References: <cover.1519620578.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pm.vger.kernel.org> X-Mailing-List: linux-pm@vger.kernel.org |
Series |
cpufreq: Stop validating cpufreq table in drivers
|
expand
|
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index cdf097b29862..60bea302abbe 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c @@ -184,7 +184,6 @@ static int eps_cpu_init(struct cpufreq_policy *policy) struct cpuinfo_x86 *c = &cpu_data(0); struct cpufreq_frequency_table *f_table; int k, step, voltage; - int ret; int states; #if IS_ENABLED(CONFIG_ACPI_PROCESSOR) unsigned int limit; @@ -359,12 +358,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) } policy->cpuinfo.transition_latency = 140000; /* 844mV -> 700mV in ns */ - - ret = cpufreq_table_validate_and_show(policy, ¢aur->freq_table[0]); - if (ret) { - kfree(centaur); - return ret; - } + policy->freq_table = ¢aur->freq_table[0]; return 0; }
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 e_powersaver driver. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/e_powersaver.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.15.0.194.g9af6a3dea062