From patchwork Tue Aug 3 14:16:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Sewior X-Patchwork-Id: 12416483 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFB0FC43214 for ; Tue, 3 Aug 2021 14:17:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A735F60BD3 for ; Tue, 3 Aug 2021 14:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236626AbhHCOR1 (ORCPT ); Tue, 3 Aug 2021 10:17:27 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57074 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236528AbhHCORW (ORCPT ); Tue, 3 Aug 2021 10:17:22 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TRsxK9GZ6nFI6VodGYuBnw38AKr/uEtGEHDYZfi69/8=; b=Es6QNFuerxXYMYUmi2dnf/UpUXFOU5BZpPczCx6q1tAs0fs7tXnwnbsb8zJ/eRFge36k7D Nb72Of9GPR2XLFCZzD9JrhcOGyEpHcn1GWMjYAFsCxOQV8ciDov8Nu80hNafkfCwuPNyWm 2xol5x1mwYKU0Xfsw9Hn7Aj4WTW/ksY7R1CdUUcbKvNqeO9oGMGyhZFFb8tp6LcuPt8fD5 SdCdCUcK7BSyVSUlqMsjqx8hMPfoTPvb0AP05N+ch4CpQRDx5k1VjffwN/vCWTssKwiyrk sf+nHm2AJrcw9RdAA/icEpS3y8azDq9cu3f4TMNprYxgzPiOxq1odUM4jTTHwQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TRsxK9GZ6nFI6VodGYuBnw38AKr/uEtGEHDYZfi69/8=; b=Om3BvxS622lBsFKO7++i965k3w6Ba+2i8l7OTBJeWZs5b/6EvqS0Tulk2oUmtbiu7zYwiw M0uJwPgesY/Gu2BA== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Zhang Rui , Daniel Lezcano , Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH 19/38] thermal: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:16:02 +0200 Message-Id: <20210803141621.780504-20-bigeasy@linutronix.de> In-Reply-To: <20210803141621.780504-1-bigeasy@linutronix.de> References: <20210803141621.780504-1-bigeasy@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: linux-pm@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/thermal/intel/intel_powerclamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/intel/intel_powerclamp.c b/drivers/thermal/intel/intel_powerclamp.c index b0eb5ece9243b..a5b58ea89cc6d 100644 --- a/drivers/thermal/intel/intel_powerclamp.c +++ b/drivers/thermal/intel/intel_powerclamp.c @@ -528,7 +528,7 @@ static int start_power_clamp(void) set_target_ratio = clamp(set_target_ratio, 0U, MAX_TARGET_RATIO - 1); /* prevent cpu hotplug */ - get_online_cpus(); + cpus_read_lock(); /* prefer BSP */ control_cpu = 0; @@ -542,7 +542,7 @@ static int start_power_clamp(void) for_each_online_cpu(cpu) { start_power_clamp_worker(cpu); } - put_online_cpus(); + cpus_read_unlock(); return 0; }