summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-11-24 19:23:35 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2013-11-30 21:09:43 +0100
commitc35a75d9425069298276b86b091f9a0ac26e26bd (patch)
tree7ace391b0b91f0cce46ed0dc4ba9f28e5f0b5210
parentd0564b13a8e579f79697096f2cde604255a1b4b4 (diff)
backports: remove atomic_inc_not_zero_hint()
Upstream commit: 97147b1ee4f249d03a0efb2833779db7ffc02bee atomic_inc_not_zero_hint() was never called by any code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/atomic.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/backport/backport-include/linux/atomic.h b/backport/backport-include/linux/atomic.h
index 378b748f..41b769be 100644
--- a/backport/backport-include/linux/atomic.h
+++ b/backport/backport-include/linux/atomic.h
@@ -6,41 +6,7 @@
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36))
#include_next <linux/atomic.h>
#else
-
#include <asm/atomic.h>
-
-/**
- * atomic_inc_not_zero_hint - increment if not null
- * @v: pointer of type atomic_t
- * @hint: probable value of the atomic before the increment
- *
- * This version of atomic_inc_not_zero() gives a hint of probable
- * value of the atomic. This helps processor to not read the memory
- * before doing the atomic read/modify/write cycle, lowering
- * number of bus transactions on some arches.
- *
- * Returns: 0 if increment was not done, 1 otherwise.
- */
-#ifndef atomic_inc_not_zero_hint
-static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint)
-{
- int val, c = hint;
-
- /* sanity test, should be removed by compiler if hint is a constant */
- if (!hint)
- return atomic_inc_not_zero(v);
-
- do {
- val = atomic_cmpxchg(v, c, c + 1);
- if (val == c)
- return 1;
- c = val;
- } while (c);
-
- return 0;
-}
-#endif
-
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)) */
#endif /* _COMPAT_LINUX_ATOMIC_H */