File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ typedef struct refcount_struct {
22
22
} refcount_t ;
23
23
24
24
#define REFCOUNT_INIT (n ) { .refs = ATOMIC_INIT(n), }
25
+ #define REFCOUNT_MAX INT_MAX
26
+ #define REFCOUNT_SATURATED (INT_MIN / 2)
25
27
26
28
enum refcount_saturation_type {
27
29
REFCOUNT_ADD_NOT_ZERO_OVF ,
@@ -57,9 +59,6 @@ static inline unsigned int refcount_read(const refcount_t *r)
57
59
#ifdef CONFIG_REFCOUNT_FULL
58
60
#include <linux/bug.h>
59
61
60
- #define REFCOUNT_MAX INT_MAX
61
- #define REFCOUNT_SATURATED (INT_MIN / 2)
62
-
63
62
/*
64
63
* Variant of atomic_t specialized for reference counts.
65
64
*
@@ -300,10 +299,6 @@ static inline void refcount_dec(refcount_t *r)
300
299
refcount_warn_saturate (r , REFCOUNT_DEC_LEAK );
301
300
}
302
301
#else /* CONFIG_REFCOUNT_FULL */
303
-
304
- #define REFCOUNT_MAX INT_MAX
305
- #define REFCOUNT_SATURATED (INT_MIN / 2)
306
-
307
302
# ifdef CONFIG_ARCH_HAS_REFCOUNT
308
303
# include <asm/refcount.h>
309
304
# else
You can’t perform that action at this time.
0 commit comments