summaryrefslogtreecommitdiff
path: root/drivers/powercap
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-01-06 11:36:35 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-01-07 20:13:51 +0300
commit2185c23071e2c1f26fbccb323aa831732540cfcc (patch)
tree4d345aedbf1d613e7dfb8bb52e74373b90e0bae5 /drivers/powercap
parent8f50db4b5c79af2ba54f5fbe8a5173fd7f37a493 (diff)
downloadlinux-2185c23071e2c1f26fbccb323aa831732540cfcc.tar.xz
powercap/drivers/dtpm: Fix a double shift bug
The DTPM_POWER_LIMIT_FLAG is used for test_bit() etc which take a bit number so it should be bit 0. But currently it's set to BIT(0) then that is double shifted equivalent to BIT(BIT(0)). This doesn't cause a run time problem because it's done consistently. Fixes: a20d0ef97abf ("powercap/drivers/dtpm: Add API for dynamic thermal power management") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/powercap')
-rw-r--r--drivers/powercap/dtpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
index 0abcc439d728..d49df0569cd4 100644
--- a/drivers/powercap/dtpm.c
+++ b/drivers/powercap/dtpm.c
@@ -24,7 +24,7 @@
#include <linux/slab.h>
#include <linux/mutex.h>
-#define DTPM_POWER_LIMIT_FLAG BIT(0)
+#define DTPM_POWER_LIMIT_FLAG 0
static const char *constraint_name[] = {
"Instantaneous",