Home
last modified time | relevance | path

Searched refs:new (Results 1 – 20 of 20) sorted by relevance

/lib/
Drefcount.c63 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero() local
72 new = val + i; in refcount_add_not_zero()
73 if (new < val) in refcount_add_not_zero()
74 new = UINT_MAX; in refcount_add_not_zero()
76 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero()
78 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_add_not_zero()
120 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero() local
123 new = val + 1; in refcount_inc_not_zero()
128 if (unlikely(!new)) in refcount_inc_not_zero()
131 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero()
[all …]
Derrseq.c78 errseq_t new; in errseq_set() local
81 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set()
85 new += ERRSEQ_CTR_INC; in errseq_set()
88 if (new == old) { in errseq_set()
89 cur = new; in errseq_set()
94 cur = cmpxchg(eseq, old, new); in errseq_set()
100 if (likely(cur == old || cur == new)) in errseq_set()
174 errseq_t old, new; in errseq_check_and_advance() local
195 new = old | ERRSEQ_SEEN; in errseq_check_and_advance()
196 if (new != old) in errseq_check_and_advance()
[all …]
Dlockref.c16 struct lockref new = old, prev = old; \
20 new.lock_count); \
44 new.count++; in lockref_get()
65 new.count++; in lockref_get_not_zero()
92 new.count++; in lockref_get_or_lock()
118 new.count--; in lockref_put_return()
122 return new.count; in lockref_put_return()
136 new.count--; in lockref_put_or_lock()
173 new.count++; in lockref_get_not_dead()
Dprime_numbers.c111 struct primes *new; in expand_to_next_prime() local
127 new = kmalloc(sizeof(*new) + bitmap_size(sz), in expand_to_next_prime()
129 if (!new) in expand_to_next_prime()
135 kfree(new); in expand_to_next_prime()
143 bitmap_fill(new->primes, sz); in expand_to_next_prime()
144 bitmap_copy(new->primes, p->primes, p->sz); in expand_to_next_prime()
145 for (y = 2UL; y < sz; y = find_next_bit(new->primes, sz, y + 1)) in expand_to_next_prime()
146 new->last = clear_multiples(y, new->primes, p->sz, sz); in expand_to_next_prime()
147 new->sz = sz; in expand_to_next_prime()
149 BUG_ON(new->last <= x); in expand_to_next_prime()
[all …]
Drbtree_test.c33 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert() local
36 while (*new) { in insert()
37 parent = *new; in insert()
39 new = &parent->rb_left; in insert()
41 new = &parent->rb_right; in insert()
44 rb_link_node(&node->rb, parent, new); in insert()
50 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert_cached() local
54 while (*new) { in insert_cached()
55 parent = *new; in insert_cached()
57 new = &parent->rb_left; in insert_cached()
[all …]
Drbtree.c87 __rb_rotate_set_parents(struct rb_node *old, struct rb_node *new, in __rb_rotate_set_parents() argument
91 new->__rb_parent_color = old->__rb_parent_color; in __rb_rotate_set_parents()
92 rb_set_parent_color(old, new, color); in __rb_rotate_set_parents()
93 __rb_change_child(old, new, parent, root); in __rb_rotate_set_parents()
99 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert() argument
244 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in ____rb_erase_color() argument
427 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_erase_color() argument
441 static inline void dummy_copy(struct rb_node *old, struct rb_node *new) {} in dummy_copy() argument
442 static inline void dummy_rotate(struct rb_node *old, struct rb_node *new) {} in dummy_rotate() argument
493 void (*augment_rotate)(struct rb_node *old, struct rb_node *new)) in __rb_insert_augmented() argument
[all …]
Dlist_debug.c20 bool __list_add_valid(struct list_head *new, struct list_head *prev, in __list_add_valid() argument
29 CHECK_DATA_CORRUPTION(new == prev || new == next, in __list_add_valid()
31 new, prev, next)) in __list_add_valid()
Didr.c280 int new; in ida_get_new_above() local
303 new = iter.index * IDA_BITMAP_BITS; in ida_get_new_above()
311 *id = new + ebit - RADIX_TREE_EXCEPTIONAL_SHIFT; in ida_get_new_above()
325 new += bit; in ida_get_new_above()
326 if (new < 0) in ida_get_new_above()
336 new += bit; in ida_get_new_above()
337 if (new < 0) in ida_get_new_above()
344 *id = new; in ida_get_new_above()
355 *id = new; in ida_get_new_above()
Datomic64_test.c83 #define XCHG_FAMILY_TEST(bit, init, new) \ argument
85 FAMILY_TEST(TEST_ARGS, bit, xchg, init, init, new, new); \
88 #define CMPXCHG_FAMILY_TEST(bit, init, new, wrong) \ argument
91 init, init, new, init, new); \
93 init, init, init, wrong, new); \
Dstackdepot.c260 struct stack_record *new = in depot_save_stack() local
263 if (new) { in depot_save_stack()
264 new->next = *bucket; in depot_save_stack()
269 smp_store_release(bucket, new); in depot_save_stack()
270 found = new; in depot_save_stack()
Dtest_kmod.c883 unsigned long new; in test_dev_config_update_uint_sync() local
886 ret = kstrtoul(buf, 10, &new); in test_dev_config_update_uint_sync()
890 if (new > UINT_MAX) in test_dev_config_update_uint_sync()
896 *(unsigned int *)config = new; in test_dev_config_update_uint_sync()
921 unsigned long new; in test_dev_config_update_uint_range() local
923 ret = kstrtoul(buf, 10, &new); in test_dev_config_update_uint_range()
927 if (new < min || new > max) in test_dev_config_update_uint_range()
931 *config = new; in test_dev_config_update_uint_range()
943 long new; in test_dev_config_update_int() local
945 ret = kstrtol(buf, 10, &new); in test_dev_config_update_int()
[all …]
Ddebugobjects.c99 struct debug_obj *new; in fill_pool() local
110 new = kmem_cache_zalloc(obj_cache, gfp); in fill_pool()
111 if (!new) in fill_pool()
115 hlist_add_head(&new->node, &obj_pool); in fill_pool()
1079 struct debug_obj *obj, *new; in debug_objects_replace_static_objects() local
1108 new = hlist_entry(obj_pool.first, typeof(*obj), node); in debug_objects_replace_static_objects()
1109 hlist_del(&new->node); in debug_objects_replace_static_objects()
1111 *new = *obj; in debug_objects_replace_static_objects()
1112 hlist_add_head(&new->node, &db->list); in debug_objects_replace_static_objects()
Datomic64.c167 long long atomic64_xchg(atomic64_t *v, long long new) in atomic64_xchg() argument
175 v->counter = new; in atomic64_xchg()
Dbitmap.c748 const unsigned long *old, const unsigned long *new, in bitmap_remap() argument
757 w = bitmap_weight(new, nbits); in bitmap_remap()
764 set_bit(bitmap_ord_to_pos(new, n % w, nbits), dst); in bitmap_remap()
796 const unsigned long *new, int bits) in bitmap_bitremap() argument
798 int w = bitmap_weight(new, bits); in bitmap_bitremap()
803 return bitmap_ord_to_pos(new, n % w, bits); in bitmap_bitremap()
Dbtree.c471 unsigned long *new; in btree_insert_level() local
473 new = btree_node_alloc(head, gfp); in btree_insert_level()
474 if (!new) in btree_insert_level()
478 new, level + 1, gfp); in btree_insert_level()
480 mempool_free(new, head->mempool); in btree_insert_level()
484 setkey(geo, new, i, bkey(geo, node, i)); in btree_insert_level()
485 setval(geo, new, i, bval(geo, node, i)); in btree_insert_level()
Diov_iter.c1364 const void *dup_iter(struct iov_iter *new, struct iov_iter *old, gfp_t flags) in dup_iter() argument
1366 *new = *old; in dup_iter()
1367 if (unlikely(new->type & ITER_PIPE)) { in dup_iter()
1371 if (new->type & ITER_BVEC) in dup_iter()
1372 return new->bvec = kmemdup(new->bvec, in dup_iter()
1373 new->nr_segs * sizeof(struct bio_vec), in dup_iter()
1377 return new->iov = kmemdup(new->iov, in dup_iter()
1378 new->nr_segs * sizeof(struct iovec), in dup_iter()
Dtest_firmware.c328 long new; in test_dev_config_update_u8() local
330 ret = kstrtol(buf, 10, &new); in test_dev_config_update_u8()
334 if (new > U8_MAX) in test_dev_config_update_u8()
338 *(u8 *)cfg = new; in test_dev_config_update_u8()
Dlru_cache.c78 unsigned long old, new, val; in lc_try_lock()
81 new = old | LC_LOCKED; in lc_try_lock()
82 val = cmpxchg(&lc->flags, old, new); in lc_try_lock()
Dstring.c1060 char *strreplace(char *s, char old, char new) in strreplace() argument
1064 *s = new; in strreplace()
DKconfig.kgdb37 intended to for the development of new kgdb stubs