diff options
author | Mark Brown <broonie@kernel.org> | 2014-10-20 12:55:07 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 13:27:32 -0400 |
commit | b7a40242c82cd73cfcea305f23e67d068dd8401a (patch) | |
tree | 251b49d19cd7c371847ae1f951e1b537ca0e1c15 /kernel/kcmp.c | |
parent | d26833bfce5e56017bea9f1f50838f20e18e7b7e (diff) | |
parent | 9c6de47d53a3ce8df1642ae67823688eb98a190a (diff) |
Merge branch 'fix/dw' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-dw
Conflicts:
drivers/spi/spi-dw-mid.c
Diffstat (limited to 'kernel/kcmp.c')
-rw-r--r-- | kernel/kcmp.c | 7 |
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) | |||
44 | */ | 44 | */ |
45 | static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type) | 45 | static int kcmp_ptr(void *v1, void *v2, enum kcmp_type type) |
46 | { | 46 | { |
47 | long ret; | 47 | long t1, t2; |
48 | 48 | ||
49 | ret = kptr_obfuscate((long)v1, type) - kptr_obfuscate((long)v2, type); | 49 | t1 = kptr_obfuscate((long)v1, type); |
50 | t2 = kptr_obfuscate((long)v2, type); | ||
50 | 51 | ||
51 | return (ret < 0) | ((ret > 0) << 1); | 52 | return (t1 < t2) | ((t1 > t2) << 1); |
52 | } | 53 | } |
53 | 54 | ||
54 | /* The caller must have pinned the task */ | 55 | /* The caller must have pinned the task */ |