Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e5753da

Browse files
tobluxrafaeljw
authored andcommitted
powercap: idle_inject: Simplify if condition
The if condition !A || A && B can be simplified to !A || B. Fixes the following Coccinelle/coccicheck warning reported by excluded_middle.cocci: WARNING !A || A && B is equivalent to !A || B Compile-tested only. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b9064fb commit e5753da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/powercap/idle_inject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static enum hrtimer_restart idle_inject_timer_fn(struct hrtimer *timer)
127127
struct idle_inject_device *ii_dev =
128128
container_of(timer, struct idle_inject_device, timer);
129129

130-
if (!ii_dev->update || (ii_dev->update && ii_dev->update()))
130+
if (!ii_dev->update || ii_dev->update())
131131
idle_inject_wakeup(ii_dev);
132132

133133
duration_us = READ_ONCE(ii_dev->run_duration_us);

0 commit comments

Comments
 (0)