From patchwork Tue Aug 3 14:15:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12416503 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 4A9FCC432BE for ; Tue, 3 Aug 2021 14:17:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34F9360F58 for ; Tue, 3 Aug 2021 14:17:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236560AbhHCORV (ORCPT ); Tue, 3 Aug 2021 10:17:21 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:56924 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236534AbhHCORU (ORCPT ); Tue, 3 Aug 2021 10:17:20 -0400 From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628000228; 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=In25PvR/N4psHOiD+yXJd6IQe1XcdpDASEt9mnWN6io=; b=NBOUNDcO33bFFy8tdfRdXLPeszUBXIHCjdhVtmjcDi2Z/zP0kX0kq2QYecjTKDjXslzfqZ /0aptHDkrSdVO9VqUkudiAYfKYbt0QNqdgZMdS1J7SpzvU+ZQ+5XMgTS25OXJVNHLZO0wn g0XAoC7XrH8O27yV8YP35heZ1EVrfkL/GsIyu6DXYJ4OMrt9PwLxPaUUEAUrTuJWiM7V/s iT9FHdTk2KNVEW63mue0EqTellEZ1BHa9+gZzDIT9m1OLstjGaqgn9Am4uvdDQqWtkSO3u Qy/njcITNewauyt/e0bcvDb/cBZ/ilNAcU3/PupVFEPoy4hw76/CZCDq0dkO5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628000228; 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=In25PvR/N4psHOiD+yXJd6IQe1XcdpDASEt9mnWN6io=; b=tbVY8BJ8F0+v/UCD4qToX1ebu/WI89Rzv2fzTiMLgAgTHAnsoRC4RSuk80w+LC7NVdTzf8 2a2NTrtXnmedcFCA== To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, Peter Zijlstra , Sebastian Andrzej Siewior , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH 13/38] hwmon: Replace deprecated CPU-hotplug functions. Date: Tue, 3 Aug 2021 16:15:56 +0200 Message-Id: <20210803141621.780504-14-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-hwmon@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: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- drivers/hwmon/dell-smm-hwmon.c | 4 ++-- drivers/hwmon/fam15h_power.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index f2221ca0aa7be..c3600266e0e91 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -228,9 +228,9 @@ static int i8k_smm(struct smm_regs *regs) { int ret; - get_online_cpus(); + cpus_read_lock(); ret = smp_call_on_cpu(0, i8k_smm_func, regs, true); - put_online_cpus(); + cpus_read_unlock(); return ret; } diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index 29f5fed28c2a7..521534d5c1e5f 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c @@ -166,7 +166,7 @@ static int read_registers(struct fam15h_power_data *data) memset(data->cu_on, 0, sizeof(int) * MAX_CUS); - get_online_cpus(); + cpus_read_lock(); /* * Choose the first online core of each compute unit, and then @@ -190,7 +190,7 @@ static int read_registers(struct fam15h_power_data *data) on_each_cpu_mask(mask, do_read_registers_on_cu, data, true); - put_online_cpus(); + cpus_read_unlock(); free_cpumask_var(mask); return 0;