From patchwork Mon Feb 26 05:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 129528 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3230121lja; Sun, 25 Feb 2018 21:09:36 -0800 (PST) X-Google-Smtp-Source: AH8x2247RtkU+doU42TBUAtClVEGlUyI4r9UwQAYy2icOw4mf5WnqgKccP3MV8PizVXS7K/d6Ri5 X-Received: by 2002:a17:902:8302:: with SMTP id bd2-v6mr9120374plb.295.1519621776029; Sun, 25 Feb 2018 21:09:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519621776; cv=none; d=google.com; s=arc-20160816; b=y+kgl1nhPCm3Jjy2eb9CLn8xtKOIfFuA5FhWEc2hBBoSHzUVycsfTkgEJ5NEbSoPlL OLgEymUEhyd8pPScB/X8f1rmz7rmf38kNw7nXWqldd7EEL3MtO6JFfKduqIC3PrON7S1 zYieuTo2iaOGqLcPK8RAZRAreNTTHPngYK8L6SbfjolZJ2ZbQKCU4iQuRA17BYFtXKon Aqqiv+BHsdBfk1JmNRA2xQmI3oCSBkWgxbw39KKIvze1bmiG+2nkQNlfvpHOiP+iaSnX rWxhMYNVx61c1Z1hP2DqVyz2zx08pwil3swuZpqywroUh6gD4zw4GykM8lBeM/uiIZLH +ivw== 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=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=jvHkCNCXeZ5IQjW2YJfTEJ7Sa/zN79JJesuvDpn0bRMMJQ4maFa+cTTrsSW8RCUlQB AXrPunb2utMj56KJHDgX8Ey/80iObceIFbgzQBdmCLQ83bsW/sob6P8DGw4cM0RaeTu9 d+Egz2KBokX97RH1gQENNO+sQ6fA3/YJDyXlBl9NUD2w7OxQwAaiGg5HzuvgrAb4W9eL 1bpLBnw2PQvIeAwir2uIl862pBYJ8LqFJ0gu1osF0s5RZ2AfxGEGNTFbKyUZOw0t28fH SkKZe9b7J6d6yblLWlte/EnLM5NRos/toc9/zLL7YM4UBBJkBDPq2hNrMyuT4Upulsn5 soew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCvlamPg; 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: 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.35; Sun, 25 Feb 2018 21:09:36 -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=iCvlamPg; 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 S1750877AbeBZFJf (ORCPT + 11 others); Mon, 26 Feb 2018 00:09:35 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36674 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeBZFJe (ORCPT ); Mon, 26 Feb 2018 00:09:34 -0500 Received: by mail-pg0-f68.google.com with SMTP id i14so864920pgv.3 for ; Sun, 25 Feb 2018 21:09:34 -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=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=iCvlamPguwri/p9HR96hIbCFKA4uCjjO6xeXoVW32Nv3gySWSBUdRhSoLGrCrfKc/6 7yuN0FstDkcSVaQqLGOeYEUr+/XMLZ6qE04dG8wFETX8z4wFSNd2exCfeYpyCcpRoFPw 2WpRP1Ooafeb/XY92e4Sl2W8mQJGulmTbTSd0= 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=BEZGM4u3QBxJ1hGU4cyeM1fMJfHTIVeA+d+Hvb4o52w=; b=n2thC9siOYIsatRudRL2ZFVfIUTGlhZGp2Fb22kYKOBMzCOeUKjGL5/tcqrbWfenCY 7wBuh31Ztr1h6ZBErB6vo6kWLOz7Y5IJZ7KJdkTfmQbcoXoA/Os+u3L1EwyHBc0fHWd+ jDzCFoHffksvQcPsScBV1dtNbR2EpogX4PF77n3KvX+jRlqnMtrzrrXeRV0kFpPEH1Zi A8gn5yJvE01swEt6oPO/hXkmFQmv0GHMFapMGbBuYKfIm8YRKsec04OpHBk5BY9Y2ndV I6hVdhtKQhK+T17WRn15ecLapMS+KZWQPBE4tP0BT7gSDzVXxC/+2oMQRood0hHHJ2lt 83fA== X-Gm-Message-State: APf1xPC9pFGFeOPNtUuSHgyg2L4LN1FMEo2KQJ1xmWmXDV0vhSfibTjD +rTy+lNrotOtGrSOh9FQ7tB8Vd0raM8= X-Received: by 10.167.129.24 with SMTP id b24mr9361235pfi.183.1519621774051; Sun, 25 Feb 2018 21:09:34 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id t87sm17269645pfi.37.2018.02.25.21.09.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:33 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 02/27] cpufreq: Don't validate cpufreq table from cpufreq_generic_init() Date: Mon, 26 Feb 2018 10:38:45 +0530 Message-Id: <4c60b30c1a011f6750675e62217bf8edeef8f03d.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 The cpufreq table is already validated by the cpufreq core and none of the users of cpufreq_generic_init() have any dependency on it to validate the table as well. Don't validate the cpufreq table anymore from cpufreq_generic_init(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 239063fb6afc..075d18f6ba7a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -178,14 +178,7 @@ int cpufreq_generic_init(struct cpufreq_policy *policy, struct cpufreq_frequency_table *table, unsigned int transition_latency) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, table); - if (ret) { - pr_err("%s: invalid frequency table: %d\n", __func__, ret); - return ret; - } - + policy->freq_table = table; policy->cpuinfo.transition_latency = transition_latency; /*