From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Balsam CHIHI <bchihi@baylibre.com>,
Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Eduardo Valentin <edubezval@gmail.com>,
Keerthy <j-keerthy@ti.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Ido Schimmel <idosch@nvidia.com>, Mark Brown <broonie@kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
"open list:TI BANDGAP AND THERMAL DRIVER"
<linux-omap@vger.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v2 06/16] thermal: Don't use 'device' internal thermal zone structure field
Date: Wed, 22 Feb 2023 21:00:05 +0100 [thread overview]
Message-ID: <0889767f-d187-0cb4-895e-c149517b6636@linaro.org> (raw)
In-Reply-To: <CAJZ5v0gTmi7ZeDDdHWGWju4m3bv2366oVqSP1dGOT+3jLV-jaw@mail.gmail.com>
On 22/02/2023 20:43, Rafael J. Wysocki wrote:
> On Tue, Feb 21, 2023 at 7:07 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>> Some drivers are directly using the thermal zone's 'device' structure
>> field.
>>
>> Use the driver device pointer instead of the thermal zone device when
>> it is available.
>>
>> Remove the traces when they are duplicate with the traces in the core
>> code.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek LVTS
>> ---
[ ... ]
>> thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED);
>>
>> - dev_dbg(&data->ti_thermal->device, "updated thermal zone %s\n",
>> + dev_dbg(data->bgp->dev, "updated thermal zone %s\n",
>> data->ti_thermal->type);
>
> The code before the change is more consistent, because it refers to
> the same object in both instances.
>
> It looks like a type field accessor is needed, eg. thermal_zone_device_type()?
>
> Or move the debug message to thermal_zone_device_update()?
Actually it is done on purpose because the patch 9 replaces the accesses
to 'type' by 'id', the thermal_zone_device_type() accessor won't be needed.
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-22 20:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230221180710.2781027-1-daniel.lezcano@linaro.org>
2023-02-21 18:06 ` [PATCH v2 03/16] thermal: Remove debug or error messages in get_temp() ops Daniel Lezcano
2023-02-22 19:23 ` Florian Fainelli
2023-02-21 18:06 ` [PATCH v2 04/16] thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() Daniel Lezcano
2023-02-22 19:23 ` Florian Fainelli
2023-02-21 18:06 ` [PATCH v2 05/16] thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() Daniel Lezcano
2023-02-21 18:22 ` Jernej Škrabec
2023-02-22 9:31 ` AngeloGioacchino Del Regno
2023-02-21 18:07 ` [PATCH v2 06/16] thermal: Don't use 'device' internal thermal zone structure field Daniel Lezcano
2023-02-22 9:31 ` AngeloGioacchino Del Regno
2023-02-22 19:43 ` Rafael J. Wysocki
2023-02-22 20:00 ` Daniel Lezcano [this message]
2023-02-22 20:06 ` Rafael J. Wysocki
2023-02-23 9:56 ` Daniel Lezcano
2023-02-23 11:43 ` Rafael J. Wysocki
2023-02-23 14:35 ` Daniel Lezcano
2023-02-21 18:07 ` [PATCH v2 09/16] thermal: Do not access 'type' field, use the tz id instead Daniel Lezcano
2023-02-22 9:31 ` AngeloGioacchino Del Regno
2023-02-22 19:47 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0889767f-d187-0cb4-895e-c149517b6636@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bchihi@baylibre.com \
--cc=broonie@kernel.org \
--cc=edubezval@gmail.com \
--cc=festevam@gmail.com \
--cc=idosch@nvidia.com \
--cc=j-keerthy@ti.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox