Re: [PATCH v2 2/2] cpufreq: simplify setpolicy/target check in driver verification
From: Zihuan Zhang
Date: Thu Aug 21 2025 - 06:22:33 EST
在 2025/8/21 17:56, Viresh Kumar 写道:
On 21-08-25, 17:45, Zihuan Zhang wrote:
I would rather do:
(!!driver_data->setpolicy == (driver_data->target_index || driver_data->target))
The current version of the code is much better and safer.
You can actually do this.. This first converts
`driver_data->setpolicy` to bool and then compares both of them, and
both can't be true or false.
Thanks. I will.