[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <890e4d95-bd73-4176-993a-fc922d72cdde@collabora.com>
Date: Tue, 26 Nov 2024 10:43:44 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Nícolas F. R. A. Prado <nfraprado@...labora.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, Matthias Brugger
<matthias.bgg@...il.com>, Alexandre Mergnat <amergnat@...libre.com>,
Balsam CHIHI <bchihi@...libre.com>
Cc: kernel@...labora.com, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, Hsin-Te Yuan <yuanhsinte@...omium.org>,
Chen-Yu Tsai <wenst@...omium.org>, Bernhard Rosenkränzer
<bero@...libre.com>, "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH 5/5] thermal/drivers/mediatek/lvts: Only update IRQ enable
for valid sensors
Il 25/11/24 22:20, Nícolas F. R. A. Prado ha scritto:
> Only sensors that are valid need to have their interrupts enable status
> updated based on their thresholds. Use the lvts_for_each_valid_sensor()
> helper in lvts_update_irq_mask() to ignore invalid sensors.
>
> Currently, since the invalid sensors will always contain zeroed out
> thresholds (from kzalloc), they will always get their interrupts
> disabled on this loop. So this commit doesn't change the resulting
> interrupts configuration, but it slightly optimizes the loop by skipping
> the invalid sensors, avoids potential future surprises if at some point
> memory is no longer allocated for invalid sensors, as well as makes the
> code more obvious.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
That's lovely.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Powered by blists - more mailing lists