From 2185c23071e2c1f26fbccb323aa831732540cfcc Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 6 Jan 2021 11:36:35 +0300 Subject: 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 Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki --- drivers/powercap/dtpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/powercap') 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 #include -#define DTPM_POWER_LIMIT_FLAG BIT(0) +#define DTPM_POWER_LIMIT_FLAG 0 static const char *constraint_name[] = { "Instantaneous", -- cgit v1.2.3