From: Christoph Böhmwalder Date: Tue, 22 Nov 2022 13:42:59 +0000 (+0100) Subject: lru_cache: remove compiled out code X-Git-Tag: v6.6.17~5962^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9933438430b3b787f96bb434b4490b0dda59c9b3;p=platform%2Fkernel%2Flinux-rpi.git lru_cache: remove compiled out code Signed-off-by: Christoph Böhmwalder Link: https://lore.kernel.org/r/20221122134301.69258-3-christoph.boehmwalder@linbit.com Signed-off-by: Jens Axboe --- diff --git a/lib/lru_cache.c b/lib/lru_cache.c index fec8993..5dd5e4c0 100644 --- a/lib/lru_cache.c +++ b/lib/lru_cache.c @@ -60,17 +60,6 @@ int lc_try_lock(struct lru_cache *lc) } while (unlikely (val == LC_PARANOIA)); /* Spin until no-one is inside a PARANOIA_ENTRY()/RETURN() section. */ return 0 == val; -#if 0 - /* Alternative approach, spin in case someone enters or leaves a - * PARANOIA_ENTRY()/RETURN() section. */ - unsigned long old, new, val; - do { - old = lc->flags & LC_PARANOIA; - new = old | LC_LOCKED; - val = cmpxchg(&lc->flags, old, new); - } while (unlikely (val == (old ^ LC_PARANOIA))); - return old == val; -#endif } /**