From patchwork Mon Feb 26 05:08:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10241249 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 A20C260208 for ; Mon, 26 Feb 2018 05:09:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 948B5292DF for ; Mon, 26 Feb 2018 05:09:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89569297C3; Mon, 26 Feb 2018 05:09:57 +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 371EA292DF for ; Mon, 26 Feb 2018 05:09:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbeBZFJ4 (ORCPT ); Mon, 26 Feb 2018 00:09:56 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:42991 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbeBZFJ4 (ORCPT ); Mon, 26 Feb 2018 00:09:56 -0500 Received: by mail-pg0-f67.google.com with SMTP id y8so5772796pgr.9 for ; Sun, 25 Feb 2018 21:09:55 -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=U4POzxsyRiOcOhh4vVX9bya0cGAo3jqjf6nVErE6acI=; b=D5/nnAAvYMjduiulLr7T2fSPzy1WKvKploCiqBoQ6L9goUNatBCLiygeRSrkcdL/s5 a29FABnSAu9C5bWYyhhdAOjAkd1Yh+LKfeo2Eupb70zVXgRImxFXQtpcjG8JrANLjdZX IZrc1oKjy6t4fxS5bIyXwmhEb9L6ObO1k6PX0= 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=U4POzxsyRiOcOhh4vVX9bya0cGAo3jqjf6nVErE6acI=; b=h8W4BHGBmyn/K0YYyTM1PsFC7S8ewABdyRPOOaRzVmiYYmwP7JmyM1RBe2FQoD9y1K mpdOuMf1gJDGgJGVtjhXrSQ/gvNHhKrVOEa5p8zKUTnOO1Pkt7gpzFBKfmgLhpxycL+X 0O5ar9TVhJxIYKoE4297p03x2NaScm0Z4a3iZxpzgn1I2Wowxht0KKOU7OJy1zwvI9lQ zF17ZV6nkEdi45NvBVRHngaHLY0X2kh5PQ6PcRIvAj8AwqbE/vJdUZklvtfRzQ2JaLuk e8aoVdubt4cOuv87AHED+P0qHRq5LdkD9LshmAwegpX9Q6z7z6NmNms5esrbA8BYHMVE UnCw== X-Gm-Message-State: APf1xPAAIECevCoEL/WGDn49ZqJ7kAO4ilOfM2yCmN5f2atPRLKDrXSo B1A/GvBj0NEdRk6SvLTMyvVaKI5yuFw= X-Google-Smtp-Source: AH8x225VLOJ5Lkf1BEB14/N02oZyIX8Uo9jWJV6o/08fvJLm9DGPnrTra/R9m1llvz7RflhhSMaOsw== X-Received: by 10.98.157.18 with SMTP id i18mr9421896pfd.62.1519621795627; Sun, 25 Feb 2018 21:09:55 -0800 (PST) Received: from localhost ([122.172.92.38]) by smtp.gmail.com with ESMTPSA id m3sm13539772pgd.3.2018.02.25.21.09.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Feb 2018 21:09:55 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH 10/27] cpufreq: ia64-acpi: Don't validate the frequency table twice Date: Mon, 26 Feb 2018 10:38:53 +0530 Message-Id: <8f16b7fb6292d095f27181494e99b336ddce5fb7.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 ia64-acpi driver. Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index a757c0a1e7b5..7974a2fdb760 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -270,10 +270,7 @@ acpi_cpufreq_cpu_init ( } } - result = cpufreq_table_validate_and_show(policy, freq_table); - if (result) { - goto err_freqfree; - } + policy->freq_table = freq_table; /* notify BIOS that we exist */ acpi_processor_notify_smm(THIS_MODULE); @@ -296,8 +293,6 @@ acpi_cpufreq_cpu_init ( return (result); - err_freqfree: - kfree(freq_table); err_unreg: acpi_processor_unregister_performance(cpu); err_free: