From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACECD79D8 for ; Fri, 3 Mar 2023 16:23:01 +0000 (UTC) Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 04 Mar 2023 01:21:52 +0900 Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id EE1632058442; Sat, 4 Mar 2023 01:21:51 +0900 (JST) Received: from kinkan2.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Sat, 4 Mar 2023 01:21:51 +0900 Received: from [10.212.156.241] (unknown [10.212.156.241]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 60F9D25528; Sat, 4 Mar 2023 01:21:44 +0900 (JST) Message-ID: Date: Sat, 4 Mar 2023 01:21:43 +0900 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5 02/18] thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers To: Daniel Lezcano , rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Mark Brown , AngeloGioacchino Del Regno , Balsam CHIHI , Adam Ward , Baolin Wang , Jernej Skrabec , "Rafael J . Wysocki" , Florian Fainelli , Dhruva Gole , Guillaume La Roque , Amit Kucheria , Zhang Rui , Miquel Raynal , Broadcom internal kernel review list , Ray Jui , Scott Branden , Markus Mayer , Support Opensource , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Thara Gopinath , Andy Gross , Bjorn Andersson , Konrad Dybcio , =?UTF-8?Q?Niklas_S=c3=b6derlund?= , Heiko Stuebner , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Samuel Holland , Thierry Reding , Jonathan Hunter , Talel Shenhar , Eduardo Valentin , Keerthy , Masami Hiramatsu , Matthias Brugger , Stefan Wahren , Neil Armstrong , ye xingchen , Zheng Yongjun , Srinivas Pandruvada , Davidlohr Bueso , Sumeet Pawnikar , "Lee, Chun-Yi" , Shang XiaoJing , Tim Zimmermann , Yang Li , Jiang Jian , Daniel Golle , Randy Dunlap , Ido Schimmel , Minghao Chi , Johan Hovold , Mikko Perttunen , "open list:THERMAL DRIVER FOR AMLOGIC SOCS" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "open list:QUALCOMM TSENS THERMAL DRIVER" , "open list:RENESAS R-CAR THERMAL DRIVERS" , "open list:ARM/Rockchip SoC support" , "open list:SAMSUNG THERMAL DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "open list:ARM/Allwinner sunXi SoC support" , "open list:TEGRA ARCHITECTURE SUPPORT" , "open list:TI BANDGAP AND THERMAL DRIVER" , "moderated list:ARM/Mediatek SoC support" References: <20230301201446.3713334-1-daniel.lezcano@linaro.org> <20230301201446.3713334-3-daniel.lezcano@linaro.org> Content-Language: en-US From: Kunihiko Hayashi In-Reply-To: <20230301201446.3713334-3-daniel.lezcano@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023/03/02 5:14, Daniel Lezcano wrote: > The thermal zone device structure is exposed to the different drivers > and obviously they access the internals while that should be > restricted to the core thermal code. > > In order to self-encapsulate the thermal core code, we need to prevent > the drivers accessing directly the thermal zone structure and provide > accessor functions to deal with. > > Use the devdata accessor introduced in the previous patch. > > No functional changes intended. > > Signed-off-by: Daniel Lezcano > Reviewed-by: Niklas Söderlund #R-Car > Acked-by: Mark Brown > Reviewed-by: AngeloGioacchino Del Regno > #MediaTek auxadc and lvts > Reviewed-by: Balsam CHIHI #Mediatek lvts > Reviewed-by: Adam Ward #da9062 > Reviewed-by: Baolin Wang #spread > Acked-by: Jernej Skrabec #sun8i_thermal > Acked-by: Rafael J. Wysocki > Acked-by: Florian Fainelli #Broadcom > Reviewed-by: Dhruva Gole # K3 bandgap (snip) > diff --git a/drivers/thermal/uniphier_thermal.c > b/drivers/thermal/uniphier_thermal.c > index 47801841b3f5..aef6119cc004 100644 > --- a/drivers/thermal/uniphier_thermal.c > +++ b/drivers/thermal/uniphier_thermal.c > @@ -187,7 +187,7 @@ static void uniphier_tm_disable_sensor(struct > uniphier_tm_dev *tdev) > > static int uniphier_tm_get_temp(struct thermal_zone_device *tz, int > *out_temp) > { > - struct uniphier_tm_dev *tdev = tz->devdata; > + struct uniphier_tm_dev *tdev = thermal_zone_device_priv(tz); Reviewed-by: Kunihiko Hayashi #uniphier Thank you, --- Best Regards Kunihiko Hayashi