summaryrefslogtreecommitdiff
path: root/kernel/kcmp.c
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2014-10-06 16:25:21 +0200
committerStefan Agner <stefan@agner.ch>2014-10-06 16:25:21 +0200
commitc646b0f4fdad4cc9dabdcbe40b5a893d173e2850 (patch)
tree246e0d7bc48137f2d176ad126cebd275a60b6833 /kernel/kcmp.c
parent4ce237b369eb9513c090d3c97e0c06c5a33f0cf7 (diff)
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
Merge tag 'v3.17' into toradex_vf_3.17-next
Linux 3.17 Conflicts: Documentation/devicetree/bindings/usb/mxs-phy.txt drivers/usb/phy/phy-mxs-usb.c
Diffstat (limited to 'kernel/kcmp.c')
-rw-r--r--kernel/kcmp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/kcmp.c b/kernel/kcmp.c
index e30ac0fe61c3..0aa69ea1d8fd 100644
--- a/kernel/kcmp.c
+++ b/kernel/kcmp.c
@@ -44,11 +44,12 @@ static long kptr_obfuscate(long v, int type)
*/
static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type)
{
- long ret;
+ long t1, t2;
- ret = kptr_obfuscate((long)v1, type) - kptr_obfuscate((long)v2, type);
+ t1 = kptr_obfuscate((long)v1, type);
+ t2 = kptr_obfuscate((long)v2, type);
- return (ret < 0) | ((ret > 0) << 1);
+ return (t1 < t2) | ((t1 > t2) << 1);
}
/* The caller must have pinned the task */