From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B47F8C7EE32 for ; Fri, 3 Mar 2023 16:22:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231138AbjCCQWC (ORCPT ); Fri, 3 Mar 2023 11:22:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjCCQV7 (ORCPT ); Fri, 3 Mar 2023 11:21:59 -0500 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 21B765ADF6; Fri, 3 Mar 2023 08:21:53 -0800 (PST) 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 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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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