From patchwork Tue Jan 19 14:05:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 366532 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=-18.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, USER_AGENT_GIT autolearn=unavailable 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 517BEC433E6 for ; Tue, 19 Jan 2021 23:48:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FC0D23119 for ; Tue, 19 Jan 2021 23:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729157AbhASXhb (ORCPT ); Tue, 19 Jan 2021 18:37:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395123AbhASOGz (ORCPT ); Tue, 19 Jan 2021 09:06:55 -0500 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD50CC0613D6 for ; Tue, 19 Jan 2021 06:05:45 -0800 (PST) Received: by mail-qt1-x82f.google.com with SMTP id c12so8150786qtv.5 for ; Tue, 19 Jan 2021 06:05:45 -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 :mime-version:content-transfer-encoding; bh=K6Vqc+23VASYsYGFP+qO4Y3EIsmnhbqAWUtWDpTUg5U=; b=aoBbgWW+1jyixAOrGCq8jS4cB5lnojmj9EUiBVefvGrNFKnsPv53QoXk63zgdS5qAe URGwCTa/dAK9xSDwGdna0fivCB2IS90ZvxfHS7qrFvU9lEHFPEkGjmntFbRZFgcrpWRY wGvFC5Be6CbYFw4gXVuH/9GSwygjS5aue/fjWzYZvWkU3R8srXVhFQKB+WJzi10oMuWf Mbul/Ca1tPg18oGr4oI+TQbHP3JMuRdK1v5P28+qmmfEnSkrvQNutwdpiRagj010gu7i SEj44zseOJcDBI+rL4Y9uRs8rROCF7iFLrGNwS6Vs/jacPsfadVMjuMKcG90sSzg9WBY QihQ== 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:mime-version:content-transfer-encoding; bh=K6Vqc+23VASYsYGFP+qO4Y3EIsmnhbqAWUtWDpTUg5U=; b=Gq/MS62zVM5WbXIOnTJFDM191l98S2ZvyvRVESknuulpw9zUoFZ3/JpTAa4/3Yh4pr QrzZKm4cUOV9uXwpEFv1aQkKE2EIAJUzU8Eu6lJfWvQ0ala29xh7Ml5ABjDncsgNmGxT JtXxkkJezWgazac95FObJvPB0AK24KUEyStioI+lyjlu9Zy2qZsxG6x6PAfJO2+i9Arf ZMHy358A6ZY7Pb7dfT64xk7p9/hF4RmxJ8eGICOJ2/OmGs+2Q76lq9gqMAY1ZobwDXGl ejXxDnIhU13Tb0BkrPXP7atlCC8RQQy6FwnueqNeFdssWZqLpqeZ+hQfEI02e+Ef+Y/B ag8w== X-Gm-Message-State: AOAM530YmYqx+ME+ezkLYOXYFxtL5JHS+lhPliE9cpUYVtQyT6aiAopB Gm4nXhypXFhl0lHB1M5/5hLP3Q== X-Google-Smtp-Source: ABdhPJwo6oA6QD2i4L3dX6pk5dPtyn5nSwGwlebGrIfIWPShQk6upexxNl8NkiF3jBNdlEw6/NQM2Q== X-Received: by 2002:ac8:5cd0:: with SMTP id s16mr4195712qta.309.1611065144384; Tue, 19 Jan 2021 06:05:44 -0800 (PST) Received: from pop-os.fios-router.home (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.googlemail.com with ESMTPSA id f134sm12910308qke.85.2021.01.19.06.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 06:05:43 -0800 (PST) From: Thara Gopinath To: rui.zhang@intel.com, daniel.lezcano@linaro.org, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, luciano.coelho@intel.com Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-pm@vger.kernel.org, amitk@kernel.org, nathan.errera@intel.com Subject: [PATCH 1/2] net: wireless: intel: iwlwifi: mvm: tt: Replace thermal_notify_framework Date: Tue, 19 Jan 2021 09:05:40 -0500 Message-Id: <20210119140541.2453490-2-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210119140541.2453490-1-thara.gopinath@linaro.org> References: <20210119140541.2453490-1-thara.gopinath@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org thermal_notify_framework just updates for a single trip point where as thermal_zone_device_update does other bookkeeping like updating the temperature of the thermal zone and setting the next trip point etc. Replace thermal_notify_framework with thermal_zone_device_update as the later is more thorough. Signed-off-by: Thara Gopinath --- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index 507625f96dd7..a0c6be03903a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -146,8 +146,8 @@ void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) if (mvm->tz_device.tzone) { struct iwl_mvm_thermal_device *tz_dev = &mvm->tz_device; - thermal_notify_framework(tz_dev->tzone, - tz_dev->fw_trips_index[ths_crossed]); + thermal_zone_device_update(tz_dev->tzone, + THERMAL_TRIP_VIOLATED); } #endif /* CONFIG_THERMAL */ } From patchwork Tue Jan 19 14:05:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thara Gopinath X-Patchwork-Id: 366221 Delivered-To: patch@linaro.org Received: by 2002:a02:a60d:0:0:0:0:0 with SMTP id c13csp1202897jam; Tue, 19 Jan 2021 15:38:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKr4AeRHhb9SGq0tMeWyeUBaGuT1wCdckB0qRwN/ld2jjQAaYP8WIUc26laGImVOIYKX70 X-Received: by 2002:a17:906:b243:: with SMTP id ce3mr4353783ejb.489.1611099506365; Tue, 19 Jan 2021 15:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611099506; cv=none; d=google.com; s=arc-20160816; b=OisklX1vFfHLdnGI9b9T5dOj0Jah4MDOFp/QgYCezVrhd4uDSZaNOLuZYUxxQTXmR8 JF2CK1WiYFMgCP3TbnN33ccXds0z1+P/0Sz4pG75DHX1HHDX6PuZPaBEFPI6sUmK65n1 nOGKIWJJyYQu7AWgfl4SbEJ3ZIMTiEZD3Rai9YLZDMk6BHGbc3fyAvCnKHr831fz+Jls 5kuzMxt4yjUrHYxaWLcZIjeE92m6V82SvV0kvPTToqYp/tMIk4O0qlYEBQzaIwGnxNZ9 C9VMm2vYPMgxmRNsrlkarqfhDMlVK4YV5nkZkQXU+yvc/FyBWD5nWJOYEBMEUfzcPhyZ BBBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M04lwPBiKAp4mMR41FNkA1iddXx0RaVuGp7LGXqlLnc=; b=H2TBRRSHxj3pEBmyuI6hKluJJCiXhC2CJMT0wucnelqdla0K9Rvho4UvCyX19Jz09b S58BoDZFs5vBcKgQDBo/ogfyAYE/2Ej7L1tMcb4pj2zrTtNNVyyPedeDdZGqK+D3CWje 0i4t3IKF2cSjtpl2K3BPjCQvF/gP4Hf0hUfPjCcdYKFfFXuMSJ3hJiZinv/pq0fyRnHv LNbw+nAMe6H3DjZOjpzEhqBWfMiTzLbCfy3JdpgBLQYnIVZ1XpNp4v+15VFLd7jPgMp9 nRJHdHm89dSeDEWwbT7Bhgw53P2luJ0ftu4HjDFF8IE1ZZrIEh5hzRlMp7sCYhEI95DX lUvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vRZx1zk5; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u26si156770edb.578.2021.01.19.15.38.26; Tue, 19 Jan 2021 15:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vRZx1zk5; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 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 S1729016AbhASXhf (ORCPT + 7 others); Tue, 19 Jan 2021 18:37:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392251AbhASOI5 (ORCPT ); Tue, 19 Jan 2021 09:08:57 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D016C061795 for ; Tue, 19 Jan 2021 06:05:47 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id 186so21866333qkj.3 for ; Tue, 19 Jan 2021 06:05:47 -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 :mime-version:content-transfer-encoding; bh=M04lwPBiKAp4mMR41FNkA1iddXx0RaVuGp7LGXqlLnc=; b=vRZx1zk5ZzkqnOGAk1YZbw/HJOKDieZ5fUjU36V8D48viBYKcOXQmzrUdtKmVB69iy I3ii4aCSQPTvyuVIYyuKa5DpOAjjKxjXrxNfFh44a8xHOmvJOBrj6k+6qtgntxla8hvv /c1hNOgCVTgdW61wMxlUeDpNApd/sKqJi2ZavLhRnppGBfZ/VEh262Okoih1nOixTvZe nmJE4CJjWRfCOUub6dU35mgULHEbg4EFu4cEKSfkjC3+6NAbY7NxCV+M6xkJLYlsZthA A+JeCw81ZHCprriiqORv/1TgbUSa6rr/jYGo7+B9+QK6Eg63wTY/+BUiLLN7iV63K8mg uk+Q== 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:mime-version:content-transfer-encoding; bh=M04lwPBiKAp4mMR41FNkA1iddXx0RaVuGp7LGXqlLnc=; b=pdWW++sKnoIrfaHpoiIGNVHIUvei2RMwmDESwNGa/raFbMfsb/fY3IYBYjv0ORekZI +1J9bkhqVuS42kzdQf3LxzNiOA7O0vhOaVOpv8Es6v6G1uMoMyA7PrqrvgSrm52MOGVv q6idzahACHv25stFHHZWfPCH3RcF+P1y8YEmkud5yFRCb8iAgf8GzVSUP31o8WSBIetE zN6/MNpMDPPFnue1TNOJhwEsgmUr6QTvtNFHa0tkY42xgRJ4aYZVsl/YvXatSxmfXLe9 63Ahw64FnxVE+U8+vtcBDUFFVvH+f03z74r6wQcHrdZBPfcYgriZvKTIsHNjLAJ9tm2H M0Xg== X-Gm-Message-State: AOAM5324+Ea3C6S0KFEMDYfAJiyAEDr7Px270np5aVw15APBMxM8Pf3F daXJyl6qcicXreZYqULH1xajQg== X-Received: by 2002:a37:3d1:: with SMTP id 200mr4456095qkd.30.1611065146305; Tue, 19 Jan 2021 06:05:46 -0800 (PST) Received: from pop-os.fios-router.home (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.googlemail.com with ESMTPSA id f134sm12910308qke.85.2021.01.19.06.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jan 2021 06:05:45 -0800 (PST) From: Thara Gopinath To: rui.zhang@intel.com, daniel.lezcano@linaro.org, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, luciano.coelho@intel.com Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-pm@vger.kernel.org, amitk@kernel.org, nathan.errera@intel.com Subject: [PATCH 2/2] drivers: thermal: Remove thermal_notify_framework Date: Tue, 19 Jan 2021 09:05:41 -0500 Message-Id: <20210119140541.2453490-3-thara.gopinath@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210119140541.2453490-1-thara.gopinath@linaro.org> References: <20210119140541.2453490-1-thara.gopinath@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org thermal_notify_framework just updates for a single trip point where as thermal_zone_device_update does other bookkeeping like updating the temperature of the thermal zone and setting the next trip point. The only driver that was using thermal_notify_framework was updated in the previous patch to use thermal_zone_device_update instead. Since there are no users for thermal_notify_framework remove it. Signed-off-by: Thara Gopinath --- drivers/thermal/thermal_core.c | 18 ------------------ include/linux/thermal.h | 4 ---- 2 files changed, 22 deletions(-) -- 2.25.1 diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 4a291d205d5c..04f7581b70c5 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -575,24 +575,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(thermal_zone_device_update); -/** - * thermal_notify_framework - Sensor drivers use this API to notify framework - * @tz: thermal zone device - * @trip: indicates which trip point has been crossed - * - * This function handles the trip events from sensor drivers. It starts - * throttling the cooling devices according to the policy configured. - * For CRITICAL and HOT trip points, this notifies the respective drivers, - * and does actual throttling for other trip points i.e ACTIVE and PASSIVE. - * The throttling policy is based on the configured platform data; if no - * platform data is provided, this uses the step_wise throttling policy. - */ -void thermal_notify_framework(struct thermal_zone_device *tz, int trip) -{ - handle_thermal_trip(tz, trip); -} -EXPORT_SYMBOL_GPL(thermal_notify_framework); - static void thermal_zone_device_check(struct work_struct *work) { struct thermal_zone_device *tz = container_of(work, struct diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 31b84404f047..77a0b8d060a5 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -398,7 +398,6 @@ int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); void thermal_cdev_update(struct thermal_cooling_device *); -void thermal_notify_framework(struct thermal_zone_device *, int); int thermal_zone_device_enable(struct thermal_zone_device *tz); int thermal_zone_device_disable(struct thermal_zone_device *tz); void thermal_zone_device_critical(struct thermal_zone_device *tz); @@ -446,9 +445,6 @@ static inline int thermal_zone_get_offset( static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) { } -static inline void thermal_notify_framework(struct thermal_zone_device *tz, - int trip) -{ } static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) { return -ENODEV; }