mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
thermal: armada: Fix -Wshift-negative-value
Clang produces the following warning
drivers/thermal/armada_thermal.c:270:33: warning: shifting a negative
signed value is undefined [-Wshift-negative-value]
1 warning reg &= ~CONTROL1_TSEN_AVG_MASK <<
CONTROL1_TSEN_AVG_SHIFT; generated
.
~~~~~~~~~~~~~~~~~~~~~~~ ^
CONTROL1_TSEN_AVG_SHIFT is defined to be zero.
Since shifting by zero does nothing this variable can be removed.
Cc: [email protected]
Link: https://github.com/ClangBuiltLinux/linux/issues/532
Signed-off-by: Nathan Huckleberry <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
Acked-by: Miquel Raynal <[email protected]>
Signed-off-by: Zhang Rui <[email protected]>
This commit is contained in:
parent
d1abaeb3be
commit
9aee371313
1 changed files with 2 additions and 3 deletions
|
|
@ -53,7 +53,6 @@
|
|||
#define CONTROL0_TSEN_MODE_EXTERNAL 0x2
|
||||
#define CONTROL0_TSEN_MODE_MASK 0x3
|
||||
|
||||
#define CONTROL1_TSEN_AVG_SHIFT 0
|
||||
#define CONTROL1_TSEN_AVG_MASK 0x7
|
||||
#define CONTROL1_EXT_TSEN_SW_RESET BIT(7)
|
||||
#define CONTROL1_EXT_TSEN_HW_RESETn BIT(8)
|
||||
|
|
@ -267,8 +266,8 @@ static void armada_cp110_init(struct platform_device *pdev,
|
|||
|
||||
/* Average the output value over 2^1 = 2 samples */
|
||||
regmap_read(priv->syscon, data->syscon_control1_off, ®);
|
||||
reg &= ~CONTROL1_TSEN_AVG_MASK << CONTROL1_TSEN_AVG_SHIFT;
|
||||
reg |= 1 << CONTROL1_TSEN_AVG_SHIFT;
|
||||
reg &= ~CONTROL1_TSEN_AVG_MASK;
|
||||
reg |= 1;
|
||||
regmap_write(priv->syscon, data->syscon_control1_off, reg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue