| /lib/ |
| A D | iomem_copy.c | 30 count--; in memset_io() 41 count -= sizeof(long); in memset_io() 44 while (count) { in memset_io() 47 count--; in memset_io() 68 count--; in memcpy_fromio() 82 count -= sizeof(long); in memcpy_fromio() 85 while (count) { in memcpy_fromio() 89 count--; in memcpy_fromio() 110 count--; in memcpy_toio() 126 while (count) { in memcpy_toio() [all …]
|
| A D | percpu_counter.c | 95 s64 count; in percpu_counter_add_batch() local 107 fbc->count += count + amount; in percpu_counter_add_batch() 122 s64 count; in percpu_counter_add_batch() local 129 fbc->count += count; in percpu_counter_add_batch() 149 s64 count; in percpu_counter_sync() local 153 fbc->count += count; in percpu_counter_sync() 294 s64 count; in __percpu_counter_compare() local 306 if (count > rhs) in __percpu_counter_compare() 330 s64 count; in __percpu_counter_limited_add() local 352 count = fbc->count + amount; in __percpu_counter_limited_add() [all …]
|
| A D | lockref.c | 45 new.count++; in lockref_get() 51 lockref->count++; in lockref_get() 66 new.count++; in lockref_get_not_zero() 67 if (old.count <= 0) in lockref_get_not_zero() 75 lockref->count++; in lockref_get_not_zero() 93 new.count--; in lockref_put_return() 97 return new.count; in lockref_put_return() 111 new.count--; in lockref_put_or_lock() 121 lockref->count--; in lockref_put_or_lock() 148 new.count++; in lockref_get_not_dead() [all …]
|
| A D | string.c | 96 while (count) { in strncpy() 100 count--; in strncpy() 119 if (count == 0 || WARN_ON_ONCE(count > INT_MAX)) in sized_strscpy() 182 count--; in sized_strscpy() 236 if (count) { in strncat() 262 count -= dsize; in strlcat() 264 len = count-1; in strlcat() 306 while (count) { in strncmp() 313 count--; in strncmp() 656 s += count; in memmove() [all …]
|
| A D | iomap.c | 42 static int count = 10; in bad_io_access() local 43 if (count) { in bad_io_access() 44 count--; in bad_io_access() 312 while (--count >= 0) { in mmio_insb() 320 while (--count >= 0) { in mmio_insw() 362 IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count)); in ioread8_rep() 368 IO_COND(addr, insw(port,dst,count), mmio_insw(addr, dst, count)); in ioread16_rep() 374 IO_COND(addr, insl(port,dst,count), mmio_insl(addr, dst, count)); in ioread32_rep() 386 IO_COND(addr, outsb(port, src, count), mmio_outsb(addr, src, count)); in iowrite8_rep() 392 IO_COND(addr, outsw(port, src, count), mmio_outsw(addr, src, count)); in iowrite16_rep() [all …]
|
| A D | strnlen_user.c | 23 static __always_inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned l… in do_strnlen_user() argument 60 if (res >= count) in do_strnlen_user() 61 return count+1; in do_strnlen_user() 92 long strnlen_user(const char __user *str, long count) in strnlen_user() argument 96 if (unlikely(count <= 0)) in strnlen_user() 103 retval = do_strnlen_user(str, count, count); in strnlen_user() 118 if (max > count) in strnlen_user() 119 max = count; in strnlen_user() 122 retval = do_strnlen_user(str, count, max); in strnlen_user()
|
| A D | strncpy_from_user.c | 29 unsigned long count, unsigned long max) in do_strncpy_from_user() argument 84 if (res >= count) in do_strncpy_from_user() 113 long strncpy_from_user(char *dst, const char __user *src, long count) in strncpy_from_user() argument 120 if (unlikely(count <= 0)) in strncpy_from_user() 123 kasan_check_write(dst, count); in strncpy_from_user() 124 check_object_size(dst, count, false); in strncpy_from_user() 130 retval = do_strncpy_from_user(dst, src, count, count); in strncpy_from_user() 145 if (max > count) in strncpy_from_user() 146 max = count; in strncpy_from_user() 149 retval = do_strncpy_from_user(dst, src, count, max); in strncpy_from_user()
|
| A D | iomap_copy.c | 20 void __iowrite32_copy(void __iomem *to, const void *from, size_t count) in __iowrite32_copy() argument 24 const u32 *end = src + count; in __iowrite32_copy() 42 void __ioread32_copy(void *to, const void __iomem *from, size_t count) in __ioread32_copy() argument 46 const u32 __iomem *end = src + count; in __ioread32_copy() 64 void __iowrite64_copy(void __iomem *to, const void *from, size_t count) in __iowrite64_copy() argument 69 const u64 *end = src + count; in __iowrite64_copy() 74 __iowrite32_copy(to, from, count * 2); in __iowrite64_copy()
|
| A D | iov_iter.c | 101 size -= count; in fault_in_iov_iter_readable() 144 size -= count; in fault_in_iov_iter_writeable() 174 .count = count in iov_iter_init() 687 .count = count in iov_iter_kvec() 703 .count = count in iov_iter_bvec() 732 .count = count, in iov_iter_folio_queue() 760 .count = count, in iov_iter_xarray() 781 .count = count, in iov_iter_discard() 1048 iter->count = count; in iter_folioq_get_pages() 1096 if (!count) in iter_xarray_get_pages() [all …]
|
| A D | percpu-refcount.c | 98 atomic_long_set(&data->count, start_count); in percpu_ref_init() 174 unsigned long count = 0; in percpu_ref_switch_to_atomic_rcu() local 178 count += *per_cpu_ptr(percpu_count, cpu); in percpu_ref_switch_to_atomic_rcu() 181 atomic_long_read(&data->count), count); in percpu_ref_switch_to_atomic_rcu() 195 atomic_long_add((long)count - PERCPU_COUNT_BIAS, &data->count); in percpu_ref_switch_to_atomic_rcu() 197 if (WARN_ONCE(atomic_long_read(&data->count) <= 0, in percpu_ref_switch_to_atomic_rcu() 199 data->release, atomic_long_read(&data->count)) && in percpu_ref_switch_to_atomic_rcu() 250 atomic_long_add(PERCPU_COUNT_BIAS, &ref->data->count); in __percpu_ref_switch_to_percpu() 413 unsigned long count, flags; in percpu_ref_is_zero() local 421 count = atomic_long_read(&ref->data->count); in percpu_ref_is_zero() [all …]
|
| A D | oid_registry.c | 136 int count; in sprint_oid() local 142 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); in sprint_oid() 143 if (count >= bufsize) in sprint_oid() 145 buffer += count; in sprint_oid() 146 bufsize -= count; in sprint_oid() 162 ret += count = snprintf(buffer, bufsize, ".%lu", num); in sprint_oid() 163 if (count >= bufsize) in sprint_oid() 165 buffer += count; in sprint_oid() 166 bufsize -= count; in sprint_oid()
|
| A D | test_firmware.c | 218 return count; in __kstrncpy() 268 ret = count; in reset_store() 521 count, in config_into_buf_store() 598 count, in config_partial_store() 689 rc = count; in trigger_request_store() 745 rc = count; in trigger_request_platform_store() 798 rc = count; in trigger_async_request_store() 844 rc = count; in trigger_custom_fallback_store() 965 rc = count; in trigger_batched_requests_store() 1074 rc = count; in trigger_batched_requests_async_store() [all …]
|
| A D | fault-inject.c | 164 attr->count++; in should_fail_ex() 165 if (attr->count % attr->interval) in should_fail_ex() 305 return count; in fault_uint_attr_store() 318 return count; in fault_ulong_attr_store() 321 static ssize_t fault_bool_attr_store(bool *val, const char *page, size_t count) in fault_bool_attr_store() argument 331 return count; in fault_bool_attr_store() 344 return count; in fault_atomic_t_attr_store() 369 return fault_##TYPE##_attr_store(&config->attr.MEMBER, page, count); \ 395 size_t count) in fault_stacktrace_depth_store() argument 407 return count; in fault_stacktrace_depth_store() [all …]
|
| A D | fw_table.c | 159 int count = 0; in acpi_parse_entries_array() local 180 if (!max_entries || count < max_entries) in acpi_parse_entries_array() 184 proc[i].count++; in acpi_parse_entries_array() 185 count++; in acpi_parse_entries_array() 203 if (max_entries && count > max_entries) { in acpi_parse_entries_array() 205 id, proc->id, count - max_entries, count); in acpi_parse_entries_array() 208 return count; in acpi_parse_entries_array()
|
| A D | kstrtox.c | 399 int kstrtobool_from_user(const char __user *s, size_t count, bool *res) in kstrtobool_from_user() argument 404 count = min(count, sizeof(buf) - 1); in kstrtobool_from_user() 405 if (copy_from_user(buf, s, count)) in kstrtobool_from_user() 407 buf[count] = '\0'; in kstrtobool_from_user() 413 int f(const char __user *s, size_t count, unsigned int base, type *res) \ 418 count = min(count, sizeof(buf) - 1); \ 419 if (copy_from_user(buf, s, count)) \ 421 buf[count] = '\0'; \
|
| /lib/zstd/common/ |
| A D | bits.h | 130 U64 ZSTD_rotateRight_U64(U64 const value, U32 count) { in ZSTD_rotateRight_U64() argument 131 assert(count < 64); in ZSTD_rotateRight_U64() 132 count &= 0x3F; /* for fickle pattern recognition */ in ZSTD_rotateRight_U64() 133 return (value >> count) | (U64)(value << ((0U - count) & 0x3F)); in ZSTD_rotateRight_U64() 137 U32 ZSTD_rotateRight_U32(U32 const value, U32 count) { in ZSTD_rotateRight_U32() argument 138 assert(count < 32); in ZSTD_rotateRight_U32() 139 count &= 0x1F; /* for fickle pattern recognition */ in ZSTD_rotateRight_U32() 140 return (value >> count) | (U32)(value << ((0U - count) & 0x1F)); in ZSTD_rotateRight_U32() 144 U16 ZSTD_rotateRight_U16(U16 const value, U32 count) { in ZSTD_rotateRight_U16() argument 145 assert(count < 16); in ZSTD_rotateRight_U16() [all …]
|
| A D | entropy_common.c | 134 int count; in FSE_readNCount_body() local 137 count = bitStream & (threshold-1); in FSE_readNCount_body() 140 count = bitStream & (2*threshold-1); in FSE_readNCount_body() 141 if (count >= threshold) count -= max; in FSE_readNCount_body() 145 count--; /* extra accuracy */ in FSE_readNCount_body() 149 if (count >= 0) { in FSE_readNCount_body() 150 remaining -= count; in FSE_readNCount_body() 152 assert(count == -1); in FSE_readNCount_body() 153 remaining += count; in FSE_readNCount_body() 155 normalizedCounter[charnum++] = (short)count; in FSE_readNCount_body() [all …]
|
| /lib/zstd/compress/ |
| A D | hist.c | 30 void HIST_add(unsigned* count, const void* src, size_t srcSize) in HIST_add() argument 36 count[*ip++]++; in HIST_add() 40 unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr, in HIST_count_simple() argument 48 ZSTD_memset(count, 0, (maxSymbolValue+1) * sizeof(*count)); in HIST_count_simple() 53 count[*ip++]++; in HIST_count_simple() 56 while (!count[maxSymbolValue]) maxSymbolValue--; in HIST_count_simple() 61 if (count[s] > largestCount) largestCount = count[s]; in HIST_count_simple() 85 size_t const countSize = (*maxSymbolValuePtr + 1) * sizeof(*count); in HIST_count_parallel_wksp() 95 ZSTD_memset(count, 0, countSize); in HIST_count_parallel_wksp() 151 size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, in HIST_countFast_wksp() argument [all …]
|
| A D | hist.h | 31 size_t HIST_count(unsigned* count, unsigned* maxSymbolValuePtr, 47 size_t HIST_count_wksp(unsigned* count, unsigned* maxSymbolValuePtr, 55 size_t HIST_countFast(unsigned* count, unsigned* maxSymbolValuePtr, 63 size_t HIST_countFast_wksp(unsigned* count, unsigned* maxSymbolValuePtr, 75 unsigned HIST_count_simple(unsigned* count, unsigned* maxSymbolValuePtr, 83 void HIST_add(unsigned* count, const void* src, size_t srcSize);
|
| A D | fse_compress.c | 294 remaining -= count < 0 ? -count : count; in FSE_writeNCount_generic() 296 if (count>=threshold) in FSE_writeNCount_generic() 300 bitCount -= (count<max); in FSE_writeNCount_generic() 301 previousIs0 = (count==1); in FSE_writeNCount_generic() 392 if (count[s] == 0) { in FSE_normalizeM2() 396 if (count[s] <= lowThreshold) { in FSE_normalizeM2() 399 total -= count[s]; in FSE_normalizeM2() 402 if (count[s] <= lowOne) { in FSE_normalizeM2() 405 total -= count[s]; in FSE_normalizeM2() 423 total -= count[s]; in FSE_normalizeM2() [all …]
|
| A D | zstd_compress_sequences.c | 92 unsigned norm = (unsigned)((256 * count[s]) / total); in ZSTD_entropyCost() 93 if (count[s] != 0 && norm == 0) in ZSTD_entropyCost() 95 assert(count[s] < total); in ZSTD_entropyCost() 96 cost += count[s] * kInverseProbabilityLog256[norm]; in ZSTD_entropyCost() 107 unsigned const* count, in ZSTD_fseBitCost() argument 124 if (count[s] == 0) in ZSTD_fseBitCost() 130 cost += (size_t)count[s] * bitCost; in ZSTD_fseBitCost() 152 cost += count[s] * kInverseProbabilityLog256[norm256]; in ZSTD_crossEntropyCost() 246 unsigned* count, U32 max, in ZSTD_buildCTable() argument 272 if (count[codeTable[nbSeq-1]] > 1) { in ZSTD_buildCTable() [all …]
|
| A D | huf_compress.c | 46 U32 count; member 530 ? count in HUF_getIndex() 545 if (huffNode[i].count > huffNode[i-1].count) { in HUF_isSorted() 560 while (j >= 0 && huffNode[j].count < key.count) { in HUF_insertionSort() 644 U32 const c = count[n]; in HUF_sort() 648 huffNode[pos].count = c; in HUF_sort() 691 huffNode[nodeNb].count = huffNode[lowS].count + huffNode[lowS-1].count; in HUF_buildTree() 699 int const n1 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildTree() 700 int const n2 = (huffNode[lowS].count < huffNode[lowN].count) ? lowS-- : lowN++; in HUF_buildTree() 701 huffNode[nodeNb].count = huffNode[n1].count + huffNode[n2].count; in HUF_buildTree() [all …]
|
| /lib/tests/ |
| A D | hashtable_test.c | 127 int bkt, i, j, count; in hashtable_test_hash_for_each() local 138 count = 0; in hashtable_test_hash_for_each() 143 count++; in hashtable_test_hash_for_each() 157 int bkt, i, j, count; in hashtable_test_hash_for_each_safe() local 168 count = 0; in hashtable_test_hash_for_each_safe() 173 count++; in hashtable_test_hash_for_each_safe() 190 int bkt, i, j, count; in hashtable_test_hash_for_each_possible() local 207 count = 0; in hashtable_test_hash_for_each_possible() 212 count++; in hashtable_test_hash_for_each_possible() 262 count = 0; in hashtable_test_hash_for_each_possible_safe() [all …]
|
| /lib/zlib_inflate/ |
| A D | inftrees.c | 44 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/pldmfw/ |
| A D | pldmfw_private.h | 165 #define pldm_for_each_desc_tlv(i, desc, start, count) \ argument 167 (i) < (count); \ 199 #define pldm_for_each_record(i, record, start, count) \ argument 201 (i) < (count); \ 233 #define pldm_for_each_component(i, component, start, count) \ argument 235 (i) < (count); \
|