Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp661568ybm; Fri, 29 May 2020 09:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw12sDZ0j/yIGA6tPSoI5SCz4nH0UxuwfeE0OdgRLuzAtoKpHGvPTffE/vn9pVX1UuCPUeB X-Received: by 2002:a05:6402:17f9:: with SMTP id t25mr9242957edy.134.1590768576571; Fri, 29 May 2020 09:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590768576; cv=none; d=google.com; s=arc-20160816; b=Gd/aZDsKhej8l4Pu9rwNhqBUOQMsrVuAGfYR3CPyrkjnOoF9s6E8RD5RkJArAk9PsM da7U7L+wbh8rq8PkycTvVVAcraiFXsflxsJgAXCNpK/5CeIwKqwbYAM0GP5xoncKqWki hGDHNBSp2rz+BfCzavJ2FJYL3oFLx5fL/dqCWd+n+/f1zWeh682PW3DkpH6j+RUv9Ych RGukjypw/PNwcMM5iW7h5NYZWEbH/PFMvb13SMOBGcC+YS/xOqSsZjxNEiU0UP0GF9W4 0iPfgtquMhrdy05f+Is9zWyGqW1FxF+pAhRhOvQ0WE1SfyPt2fNef2n2rlCaSw+Wi6np PkHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=s46+B0V7SGzDlND+W0moiDOghdoNVSOBIQrzbgQ/7n4=; b=KSxYR8tShxfDeZkRUHhTYe1UECyiRHZaXqQkc0XbqanWilqFdeqt4llK5PYOwxgSTG lmT21aKBH2ttrFyTL1tJYcxmJROoByBmUYIPIH+YVKsuL2d/9E3C96G2K502F7JWxmmH CnpjzjV6njuH4/fjsYzYYYnf7Tzo/21h9eHmwYFINXseL7Qctwy0aDy795RcrlSD3647 Ow3w8ZU3JC0Id0F/tWU0ih/tG2dJ82yvyK9Q7GCaY9o5W+xNA0oXE41GHzjXjL58iRFe XEPhIDaxFFrUo9RRrMcd2kenURJ3RpasUhVGplZt+LfvUMj+KQueP3QBn2YrYrEk7ZHu 0FuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt4si7431367ejc.34.2020.05.29.09.09.08; Fri, 29 May 2020 09:09:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbgE2QJB (ORCPT + 99 others); Fri, 29 May 2020 12:09:01 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:41062 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbgE2QJA (ORCPT ); Fri, 29 May 2020 12:09:00 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id E130E2A2DFE Subject: Re: [PATCH v4 04/11] thermal: Store device mode in struct thermal_zone_device To: Guenter Roeck Cc: linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Emmanuel Grumbach , Heiko Stuebner , "Rafael J . Wysocki" , Vishal Kulkarni , Luca Coelho , Miquel Raynal , kernel@collabora.com, Fabio Estevam , Amit Kucheria , Chunyan Zhang , Daniel Lezcano , Allison Randal , NXP Linux Team , Darren Hart , Zhang Rui , Gayatri Kammela , Len Brown , Johannes Berg , Intel Linux Wireless , Sascha Hauer , Ido Schimmel , Baolin Wang , Jiri Pirko , Orson Zhai , Thomas Gleixner , Kalle Valo , Support Opensource , Enrico Weigelt , Peter Kaestle , Sebastian Reichel , Bartlomiej Zolnierkiewicz , Pengutronix Kernel Team , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Shawn Guo , "David S . Miller" , Andy Shevchenko References: <20200529154205.GA157653@roeck-us.net> From: Andrzej Pietrasiewicz Message-ID: <5010f7df-59d6-92ef-c99a-0dbd715f0ad2@collabora.com> Date: Fri, 29 May 2020 18:08:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200529154205.GA157653@roeck-us.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Guenter, W dniu 29.05.2020 o 17:42, Guenter Roeck pisze: > On Thu, May 28, 2020 at 09:20:44PM +0200, Andrzej Pietrasiewicz wrote: >> Prepare for eliminating get_mode(). >> > Might be worthwhile to explain (not only in the subject) what you are > doing here. > >> Signed-off-by: Andrzej Pietrasiewicz >> --- >> drivers/acpi/thermal.c | 18 ++++++---------- >> .../ethernet/mellanox/mlxsw/core_thermal.c | 21 +++++++------------ >> drivers/platform/x86/acerhdf.c | 15 ++++++------- >> drivers/thermal/da9062-thermal.c | 6 ++---- >> drivers/thermal/imx_thermal.c | 17 +++++++-------- >> .../intel/int340x_thermal/int3400_thermal.c | 12 +++-------- >> .../thermal/intel/intel_quark_dts_thermal.c | 16 +++++++------- >> drivers/thermal/thermal_of.c | 10 +++------ > > After this patch is applied on top of the thermal 'testing' branch, > there are still local instances of thermal_device_mode in > drivers/thermal/st/stm_thermal.c > drivers/thermal/ti-soc-thermal/ti-thermal-common.c > > If there is a reason not to replace those, it might make sense to explain > it here. > My understanding is that these two are sensor devices which are "plugged" into their "parent" thermal zone device. The latter is the "proper" tzd. They both use thermal_zone_of_device_ops instead of thermal_zone_device_ops. The former doesn't even have get_mode(). The thermal core, when it calls get_mode(), operates on the "parent" thermal zone devices. Consequently, the drivers you mention use their "mode" members for their private purpose, not for the purpose of storing the "parent" thermal zone device mode. Andrzej