mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
cpufreq: Replace double NOT (!!) with single NOT (!)
Double NOT (!!) operation is normally done to convert a non-zero value to 1 and keep zero as is, but that isn't the requirement in this case. All we wanted was to make sure that only one of the two routines isn't set, i.e. either both function pointers are set or both are unset. This can be done with a single NOT (!) operation as well. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
076b862c7e
commit
a9a22b570b
1 changed files with 1 additions and 1 deletions
|
@ -2505,7 +2505,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
|||
driver_data->target) ||
|
||||
(driver_data->setpolicy && (driver_data->target_index ||
|
||||
driver_data->target)) ||
|
||||
(!!driver_data->get_intermediate != !!driver_data->target_intermediate) ||
|
||||
(!driver_data->get_intermediate != !driver_data->target_intermediate) ||
|
||||
(!driver_data->online != !driver_data->offline))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue