summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-06-25 17:02:47 -0700
committerMichael Bestas <mkbestas@lineageos.org>2020-02-02 01:41:07 +0200
commitd1a513b1cb96f5dd99e803c521260354feaddc9d (patch)
treee36bfe98fdad744379f82eb1b1061a9be2727ec5 /drivers/input
parentb06ffe553c301b545c90d1a64e4035832ad77abf (diff)
input: touchscreen: st: Fix logical '&&' with constant operand warning
Clang warns: ../drivers/input/touchscreen/st/fts_lib/ftsGesture.c:337:165: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] ../drivers/input/touchscreen/st/fts_lib/ftsGesture.c:367:132: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/st/fts_lib/ftsGesture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/st/fts_lib/ftsGesture.c b/drivers/input/touchscreen/st/fts_lib/ftsGesture.c
index ee97a417d4cb..512541055e19 100644
--- a/drivers/input/touchscreen/st/fts_lib/ftsGesture.c
+++ b/drivers/input/touchscreen/st/fts_lib/ftsGesture.c
@@ -334,7 +334,7 @@ int addCustomGesture(u8 *data, int size, u8 gestureID)
index = gestureID - GESTURE_CUSTOM_OFFSET;
logError(0, "%s Starting Custom Gesture Adding procedure...\n", tag);
- if (size != GESTURE_CUSTOM_POINTS && gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID && GES_ID_CUST5) {
+ if (size != GESTURE_CUSTOM_POINTS && gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID != GES_ID_CUST5) {
logError(1, "%s addCustomGesture: Invalid size (%d) or Custom GestureID (%02X)! ERROR %08X\n", tag, size, gestureID, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}
@@ -364,7 +364,7 @@ int removeCustomGesture(u8 gestureID)
index = gestureID - GESTURE_CUSTOM_OFFSET;
logError(0, "%s Starting Custom Gesture Removing procedure...\n", tag);
- if (gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID && GES_ID_CUST5) {
+ if (gestureID != GES_ID_CUST1 && gestureID != GES_ID_CUST2 && gestureID != GES_ID_CUST3 && gestureID != GES_ID_CUST4 && gestureID != GES_ID_CUST5) {
logError(1, "%s removeCustomGesture: Invalid size (%d) or Custom GestureID (%02X)! ERROR %08X\n", tag, gestureID, ERROR_OP_NOT_ALLOW);
return ERROR_OP_NOT_ALLOW;
}