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: 10241233 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 DB02F60208 for ; Mon, 26 Feb 2018 05:09:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB48F292DF for ; Mon, 26 Feb 2018 05:09:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF9EF297C3; Mon, 26 Feb 2018 05:09:37 +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 C6F8B292DF for ; Mon, 26 Feb 2018 05:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750877AbeBZFJf (ORCPT ); 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-Google-Smtp-Source: AH8x2258sgpMpuvgAIXmErUh7CFJrpE+r9ds62RdLyyqxSacnHak0MxIqRy9AeoqiOEHTeKiUUslog== 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; /*