summaryrefslogtreecommitdiffstats
path: root/drivers/powercap
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-06-05 15:58:42 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-06-07 20:57:20 +0200
commite5753da31c61a049113be99d27e9f46755484577 (patch)
tree8ebce86472006da34aaa9b587ec626477062f8dd /drivers/powercap
parentb9064fb834bf50789819cfcc1449b3197ae43b68 (diff)
downloadlinux-e5753da31c61a049113be99d27e9f46755484577.tar.gz
linux-e5753da31c61a049113be99d27e9f46755484577.tar.bz2
linux-e5753da31c61a049113be99d27e9f46755484577.zip
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>
Diffstat (limited to 'drivers/powercap')
-rw-r--r--drivers/powercap/idle_inject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c
index e18a2cc4e46a..bafc59904ed3 100644
--- a/drivers/powercap/idle_inject.c
+++ b/drivers/powercap/idle_inject.c
@@ -127,7 +127,7 @@ static enum hrtimer_restart idle_inject_timer_fn(struct hrtimer *timer)
struct idle_inject_device *ii_dev =
container_of(timer, struct idle_inject_device, timer);
- if (!ii_dev->update || (ii_dev->update && ii_dev->update()))
+ if (!ii_dev->update || ii_dev->update())
idle_inject_wakeup(ii_dev);
duration_us = READ_ONCE(ii_dev->run_duration_us);