Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 34) sorted by relevance

12

/lib/
Dlockref.c43 new.count++; in lockref_get()
49 lockref->count++; in lockref_get()
64 new.count++; in lockref_get_not_zero()
65 if (old.count <= 0) in lockref_get_not_zero()
73 if (lockref->count > 0) { in lockref_get_not_zero()
74 lockref->count++; in lockref_get_not_zero()
91 new.count++; in lockref_get_or_lock()
92 if (old.count <= 0) in lockref_get_or_lock()
99 if (lockref->count <= 0) in lockref_get_or_lock()
101 lockref->count++; in lockref_get_or_lock()
[all …]
Diomap.c40 static int count = 10; in bad_io_access() local
41 if (count) { in bad_io_access()
42 count--; in bad_io_access()
145 static inline void mmio_insb(void __iomem *addr, u8 *dst, int count) in mmio_insb() argument
147 while (--count >= 0) { in mmio_insb()
153 static inline void mmio_insw(void __iomem *addr, u16 *dst, int count) in mmio_insw() argument
155 while (--count >= 0) { in mmio_insw()
161 static inline void mmio_insl(void __iomem *addr, u32 *dst, int count) in mmio_insl() argument
163 while (--count >= 0) { in mmio_insl()
172 static inline void mmio_outsb(void __iomem *addr, const u8 *src, int count) in mmio_outsb() argument
[all …]
Dstring.c112 char *strncpy(char *dest, const char *src, size_t count) in strncpy() argument
116 while (count) { in strncpy()
120 count--; in strncpy()
177 ssize_t strscpy(char *dest, const char *src, size_t count) in strscpy() argument
180 size_t max = count; in strscpy()
183 if (count == 0) in strscpy()
214 count -= sizeof(unsigned long); in strscpy()
218 while (count) { in strscpy()
226 count--; in strscpy()
268 char *strncat(char *dest, const char *src, size_t count) in strncat() argument
[all …]
Dpercpu_counter.c70 fbc->count = amount; in percpu_counter_set()
77 s64 count; in __percpu_counter_add() local
80 count = __this_cpu_read(*fbc->counters) + amount; in __percpu_counter_add()
81 if (count >= batch || count <= -batch) { in __percpu_counter_add()
84 fbc->count += count; in __percpu_counter_add()
85 __this_cpu_sub(*fbc->counters, count - amount); in __percpu_counter_add()
105 ret = fbc->count; in __percpu_counter_sum()
122 fbc->count = amount; in __percpu_counter_init()
187 fbc->count += *pcount; in percpu_counter_hotcpu_callback()
202 s64 count; in __percpu_counter_compare() local
[all …]
Dstrncpy_from_user.c25 static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned lon… in do_strncpy_from_user() argument
34 if (max > count) in do_strncpy_from_user()
35 max = count; in do_strncpy_from_user()
72 if (res >= count) in do_strncpy_from_user()
101 long strncpy_from_user(char *dst, const char __user *src, long count) in strncpy_from_user() argument
105 if (unlikely(count <= 0)) in strncpy_from_user()
114 kasan_check_write(dst, count); in strncpy_from_user()
115 check_object_size(dst, count, false); in strncpy_from_user()
117 retval = do_strncpy_from_user(dst, src, count, max); in strncpy_from_user()
Diomap_copy.c33 size_t count) in __iowrite32_copy() argument
37 const u32 *end = src + count; in __iowrite32_copy()
54 void __ioread32_copy(void *to, const void __iomem *from, size_t count) in __ioread32_copy() argument
58 const u32 __iomem *end = src + count; in __ioread32_copy()
77 size_t count) in __iowrite64_copy() argument
82 const u64 *end = src + count; in __iowrite64_copy()
87 __iowrite32_copy(to, from, count * 2); in __iowrite64_copy()
Dstrnlen_user.c27 static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max) in do_strnlen_user() argument
37 if (max > count) in do_strnlen_user()
38 max = count; in do_strnlen_user()
71 if (res >= count) in do_strnlen_user()
72 return count+1; in do_strnlen_user()
103 long strnlen_user(const char __user *str, long count) in strnlen_user() argument
107 if (unlikely(count <= 0)) in strnlen_user()
117 retval = do_strnlen_user(str, count, max); in strnlen_user()
Drbtree_test.c111 int count; in black_path_count() local
112 for (count = 0; rb; rb = rb_parent(rb)) in black_path_count()
113 count += !is_red(rb); in black_path_count()
114 return count; in black_path_count()
120 int count = 0; in check_postorder_foreach() local
122 count++; in check_postorder_foreach()
124 WARN_ON_ONCE(count != nr_nodes); in check_postorder_foreach()
130 int count = 0; in check_postorder() local
132 count++; in check_postorder()
134 WARN_ON_ONCE(count != nr_nodes); in check_postorder()
[all …]
Dpercpu-refcount.c83 atomic_long_set(&ref->count, start_count); in percpu_ref_init()
130 unsigned long count = 0; in percpu_ref_switch_to_atomic_rcu() local
134 count += *per_cpu_ptr(percpu_count, cpu); in percpu_ref_switch_to_atomic_rcu()
137 atomic_long_read(&ref->count), (long)count); in percpu_ref_switch_to_atomic_rcu()
151 atomic_long_add((long)count - PERCPU_COUNT_BIAS, &ref->count); in percpu_ref_switch_to_atomic_rcu()
153 WARN_ONCE(atomic_long_read(&ref->count) <= 0, in percpu_ref_switch_to_atomic_rcu()
155 ref->release, atomic_long_read(&ref->count)); in percpu_ref_switch_to_atomic_rcu()
197 atomic_long_add(PERCPU_COUNT_BIAS, &ref->count); in __percpu_ref_switch_to_percpu()
Doid_registry.c116 int count; in sprint_oid() local
122 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); in sprint_oid()
123 buffer += count; in sprint_oid()
124 bufsize -= count; in sprint_oid()
143 ret += count = snprintf(buffer, bufsize, ".%lu", num); in sprint_oid()
144 buffer += count; in sprint_oid()
145 bufsize -= count; in sprint_oid()
Dkstrtox.c371 int kstrtobool_from_user(const char __user *s, size_t count, bool *res) in kstrtobool_from_user() argument
376 count = min(count, sizeof(buf) - 1); in kstrtobool_from_user()
377 if (copy_from_user(buf, s, count)) in kstrtobool_from_user()
379 buf[count] = '\0'; in kstrtobool_from_user()
385 int f(const char __user *s, size_t count, unsigned int base, type *res) \
390 count = min(count, sizeof(buf) - 1); \
391 if (copy_from_user(buf, s, count)) \
393 buf[count] = '\0'; \
Dtest_firmware.c53 const char *buf, size_t count) in trigger_request_store() argument
58 name = kstrndup(buf, count, GFP_KERNEL); in trigger_request_store()
73 rc = count; in trigger_request_store()
94 const char *buf, size_t count) in trigger_async_request_store() argument
99 name = kstrndup(buf, count, GFP_KERNEL); in trigger_async_request_store()
122 rc = count; in trigger_async_request_store()
Diov_iter.c92 if (unlikely(i->count < n)) \
93 n = i->count; \
94 if (i->count) { \
125 i->count -= n; \
138 if (unlikely(bytes > i->count)) in copy_page_to_iter_iovec()
139 bytes = i->count; in copy_page_to_iter_iovec()
206 i->count -= wanted - bytes; in copy_page_to_iter_iovec()
221 if (unlikely(bytes > i->count)) in copy_page_from_iter_iovec()
222 bytes = i->count; in copy_page_from_iter_iovec()
289 i->count -= wanted - bytes; in copy_page_from_iter_iovec()
[all …]
Dargv_split.c13 int count = 0; in count_argc() local
21 count++; in count_argc()
25 return count; in count_argc()
Dlist_sort.c55 u8 count = 0; in merge_and_restore_back_links() local
79 if (unlikely(!(++count))) in merge_and_restore_back_links()
214 int i, count = 1, err = -ENOMEM; in list_sort_test() local
272 count++; in list_sort_test()
280 if (count != TEST_LIST_LEN) { in list_sort_test()
281 pr_err("error: bad list length %d", count); in list_sort_test()
Dkobject_uevent.c64 int kobject_action_type(const char *buf, size_t count, in kobject_action_type() argument
70 if (count && (buf[count-1] == '\n' || buf[count-1] == '\0')) in kobject_action_type()
71 count--; in kobject_action_type()
73 if (!count) in kobject_action_type()
77 if (strncmp(kobject_actions[action], buf, count) != 0) in kobject_action_type()
79 if (kobject_actions[action][count] != '\0') in kobject_action_type()
Ddynamic_queue_limits.c17 void dql_completed(struct dql *dql, unsigned int count) in dql_completed() argument
26 BUG_ON(count > num_queued - dql->num_completed); in dql_completed()
28 completed = dql->num_completed + count; in dql_completed()
Dhexdump.c47 int hex2bin(u8 *dst, const char *src, size_t count) in hex2bin() argument
49 while (count--) { in hex2bin()
68 char *bin2hex(char *dst, const void *src, size_t count) in bin2hex() argument
72 while (count--) in bin2hex()
Dbtree.c681 void *func2, int reap, int height, size_t count) in __btree_for_each() argument
691 count = __btree_for_each(head, geo, child, opaque, in __btree_for_each()
692 func, func2, reap, height - 1, count); in __btree_for_each()
694 func(child, opaque, bkey(geo, node, i), count++, in __btree_for_each()
699 return count; in __btree_for_each()
753 size_t count = 0; in btree_visitor() local
758 count = __btree_for_each(head, geo, head->node, opaque, func, in btree_visitor()
760 return count; in btree_visitor()
771 size_t count = 0; in btree_grim_visitor() local
776 count = __btree_for_each(head, geo, head->node, opaque, func, in btree_grim_visitor()
[all …]
Didr.c279 p->count++; in sub_alloc()
313 if (!p->count) { in idr_get_empty_slot()
331 new->count = 0; in idr_get_empty_slot()
339 new->count = 1; in idr_get_empty_slot()
365 pa[0]->count++; in idr_fill_slot()
531 while(*paa && ! --((**paa)->count)){ in sub_remove()
564 if (idp->top && idp->top->count == 1 && (idp->layers > 1) && in idr_remove()
576 to_free->count = 0; in idr_remove()
968 pa[0]->count++; in ida_get_new_above()
Dradix-tree.c226 node->shift, node->count, node->parent); in dump_node()
328 node->count = 0; in radix_tree_node_rcu_free()
523 node->count = 1; in radix_tree_extend()
588 node->count++; in __radix_tree_create()
612 node->count++; in __radix_tree_create()
651 node->count++; in __radix_tree_insert()
1417 if (node->count != 1) in radix_tree_shrink()
1484 if (node->count) { in __radix_tree_delete_node()
1493 parent->count--; in __radix_tree_delete_node()
1517 node->count--; in delete_sibling_entries()
[all …]
/lib/zlib_inflate/
Dinftrees.c44 unsigned short count[MAXBITS+1]; /* number of codes of each length */ in zlib_inflate_table() local
94 count[len] = 0; in zlib_inflate_table()
96 count[lens[sym]]++; in zlib_inflate_table()
101 if (count[max] != 0) break; in zlib_inflate_table()
113 if (count[min] != 0) break; in zlib_inflate_table()
120 left -= count[len]; in zlib_inflate_table()
129 offs[len + 1] = offs[len] + count[len]; in zlib_inflate_table()
240 if (--(count[len]) == 0) { in zlib_inflate_table()
258 left -= count[curr + drop]; in zlib_inflate_table()
/lib/reed_solomon/
Ddecode_rs.c37 int count = 0; variable
91 count = 0;
180 count = 0; /* Number of roots of lambda(x) */
192 root[count] = i;
193 loc[count] = k;
197 if (++count == deg_lambda)
200 if (deg_lambda != count) {
205 count = -EBADMSG;
227 for (j = count - 1; j >= 0; j--) {
266 for (i = 0; i < count; i++)
[all …]
/lib/zlib_deflate/
Ddeftree.c636 int count = 0; /* repeat count of the current code */ in scan_tree() local
645 if (++count < max_count && curlen == nextlen) { in scan_tree()
647 } else if (count < min_count) { in scan_tree()
648 s->bl_tree[curlen].Freq += count; in scan_tree()
652 } else if (count <= 10) { in scan_tree()
657 count = 0; prevlen = curlen; in scan_tree()
682 int count = 0; /* repeat count of the current code */ in send_tree() local
691 if (++count < max_count && curlen == nextlen) { in send_tree()
693 } else if (count < min_count) { in send_tree()
694 do { send_code(s, curlen, s->bl_tree); } while (--count != 0); in send_tree()
[all …]
/lib/xz/
Dxz_dec_stream.c87 vli_type count; member
109 vli_type count; member
274 ++s->block.count; in dec_block()
309 s->index.count = s->vli; in dec_index()
316 if (s->index.count != s->block.count) in dec_index()
333 --s->index.count; in dec_index()
337 } while (s->index.count > 0); in dec_index()

12