Home
last modified time | relevance | path

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

/lib/
Dkstrtox.c24 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) in _parse_integer_fixup_radix() argument
26 if (*base == 0) { in _parse_integer_fixup_radix()
29 *base = 16; in _parse_integer_fixup_radix()
31 *base = 8; in _parse_integer_fixup_radix()
33 *base = 10; in _parse_integer_fixup_radix()
35 if (*base == 16 && s[0] == '0' && _tolower(s[1]) == 'x') in _parse_integer_fixup_radix()
48 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *p) in _parse_integer() argument
67 if (val >= base) in _parse_integer()
74 if (res > div_u64(ULLONG_MAX - val, base)) in _parse_integer()
77 res = res * base + val; in _parse_integer()
[all …]
Dsort.c33 static bool is_aligned(const void *base, size_t size, unsigned char align) in is_aligned() argument
37 (void)base; in is_aligned()
39 lsbits |= (unsigned char)(uintptr_t)base; in is_aligned()
204 void sort_r(void *base, size_t num, size_t size, in sort_r() argument
217 if (is_aligned(base, size, 8)) in sort_r()
219 else if (is_aligned(base, size, 4)) in sort_r()
238 do_swap(base, base + n, size, swap_func); in sort_r()
255 b = do_cmp(base + c, base + d, cmp_func, priv) >= 0 ? c : d; in sort_r()
260 while (b != a && do_cmp(base + a, base + b, cmp_func, priv) >= 0) in sort_r()
265 do_swap(base + b, base + c, size, swap_func); in sort_r()
[all …]
Dtest_ida.c57 static void ida_check_destroy_1(struct ida *ida, unsigned int base) in ida_check_destroy_1() argument
59 IDA_BUG_ON(ida, ida_alloc_min(ida, base, GFP_KERNEL) != base); in ida_check_destroy_1()
84 static void ida_check_leaf(struct ida *ida, unsigned int base) in ida_check_leaf() argument
89 IDA_BUG_ON(ida, ida_alloc_min(ida, base, GFP_KERNEL) != in ida_check_leaf()
90 base + i); in ida_check_leaf()
112 unsigned long base = (1UL << 31) - j; in ida_check_max() local
114 IDA_BUG_ON(ida, ida_alloc_min(ida, base, GFP_KERNEL) != in ida_check_max()
115 base + i); in ida_check_max()
117 IDA_BUG_ON(ida, ida_alloc_min(ida, base, GFP_KERNEL) != in ida_check_max()
Dlocking-selftest.c1118 I_WW(t); I_WW(t2); I_WW(o.base); I_WW(o2.base); I_WW(o3.base);
1356 mutex_lock(&o.base); in ww_test_normal()
1357 mutex_unlock(&o.base); in ww_test_normal()
1362 ret = mutex_lock_interruptible(&o.base); in ww_test_normal()
1364 mutex_unlock(&o.base); in ww_test_normal()
1371 ret = mutex_lock_killable(&o.base); in ww_test_normal()
1373 mutex_unlock(&o.base); in ww_test_normal()
1380 ret = mutex_trylock(&o.base); in ww_test_normal()
1383 mutex_unlock(&o.base); in ww_test_normal()
1390 mutex_lock(&o.base); in ww_test_normal()
[all …]
Dbsearch.c31 void *bsearch(const void *key, const void *base, size_t num, size_t size, in bsearch() argument
38 pivot = base + (num >> 1) * size; in bsearch()
45 base = pivot + size; in bsearch()
Dtest-kstrtox.c10 unsigned int base; member
19 unsigned int base; \
36 rv = fn(t->str, t->base, &tmp); \
39 t->str, t->base, rv, tmp); \
54 rv = fn(t->str, t->base, &res); \
57 t->str, t->base, t->expected_res, rv); \
62 t->str, t->base, t->expected_res, res); \
Didr.c38 unsigned int base = idr->idr_base; in idr_alloc_u32() local
44 id = (id < base) ? 0 : id - base; in idr_alloc_u32()
46 slot = idr_get_free(&idr->idr_rt, &iter, gfp, max - base); in idr_alloc_u32()
50 *nextid = iter.index + base; in idr_alloc_u32()
200 int base = idr->idr_base; in idr_for_each() local
204 unsigned long id = iter.index + base; in idr_for_each()
232 unsigned long base = idr->idr_base; in idr_get_next_ul() local
235 id = (id < base) ? 0 : id - base; in idr_get_next_ul()
249 *nextid = iter.index + base; in idr_get_next_ul()
Dvsprintf.c61 unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base) in simple_strtoull() argument
66 cp = _parse_integer_fixup_radix(cp, &base); in simple_strtoull()
67 rv = _parse_integer(cp, base, &result); in simple_strtoull()
86 unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base) in simple_strtoul() argument
88 return simple_strtoull(cp, endp, base); in simple_strtoul()
100 long simple_strtol(const char *cp, char **endp, unsigned int base) in simple_strtol() argument
103 return -simple_strtoul(cp + 1, endp, base); in simple_strtol()
105 return simple_strtoul(cp, endp, base); in simple_strtol()
117 long long simple_strtoll(const char *cp, char **endp, unsigned int base) in simple_strtoll() argument
120 return -simple_strtoull(cp + 1, endp, base); in simple_strtoll()
[all …]
Dkstrtox.h6 const char *_parse_integer_fixup_radix(const char *s, unsigned int *base);
7 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *res);
Dtest_xarray.c205 unsigned long base = round_down(index, 1UL << order); in check_xa_mark_1() local
206 unsigned long next = base + (1UL << order); in check_xa_mark_1()
216 for (i = base; i < next; i++) { in check_xa_mark_1()
649 static noinline void check_xa_alloc_1(struct xarray *xa, unsigned int base) in check_xa_alloc_1() argument
656 xa_alloc_index(xa, base, GFP_KERNEL); in check_xa_alloc_1()
659 xa_erase_index(xa, base); in check_xa_alloc_1()
663 xa_alloc_index(xa, base, GFP_KERNEL); in check_xa_alloc_1()
666 for (i = base + 1; i < 2 * XA_CHUNK_SIZE; i++) in check_xa_alloc_1()
668 for (i = base; i < 2 * XA_CHUNK_SIZE; i++) in check_xa_alloc_1()
670 xa_alloc_index(xa, base, GFP_KERNEL); in check_xa_alloc_1()
[all …]
Dparser.c126 static int match_number(substring_t *s, int *result, int base) in match_number() argument
138 val = simple_strtol(buf, &endp, base); in match_number()
159 static int match_u64int(substring_t *s, u64 *result, int base) in match_u64int() argument
169 ret = kstrtoull(buf, base, &val); in match_u64int()
Ddecompress_bunzip2.c85 int base[MAX_HUFCODE_BITS]; member
159 int *base = NULL; in get_next_block() local
303 base = hufGroup->base-1; in get_next_block()
338 base[i+1] = pp-(t += temp[i]); in get_next_block()
343 base[minLen] = 0; in get_next_block()
365 base = hufGroup->base-1; in get_next_block()
401 || (((unsigned)(j = (j>>(hufGroup->maxLen-i))-base[i])) in get_next_block()
Dextable.c116 search_extable(const struct exception_table_entry *base, in search_extable() argument
120 return bsearch(&value, base, num, in search_extable()
Dscatterlist.c643 struct sg_page_iter *piter = &dma_iter->base; in __sg_page_iter_dma_next()
/lib/lz4/
Dlz4hc_compress.c66 hc4->base = start - 64 * KB; in LZ4HC_init()
79 const BYTE * const base = hc4->base; in LZ4HC_Insert() local
80 U32 const target = (U32)(ip - base); in LZ4HC_Insert()
84 U32 const h = LZ4HC_hashPtr(base + idx); in LZ4HC_Insert()
108 const BYTE * const base = hc4->base; in LZ4HC_InsertAndFindBestMatch() local
111 const U32 lowLimit = (hc4->lowLimit + 64 * KB > (U32)(ip - base)) in LZ4HC_InsertAndFindBestMatch()
113 : (U32)(ip - base) - (64 * KB - 1); in LZ4HC_InsertAndFindBestMatch()
126 const BYTE * const match = base + matchIndex; in LZ4HC_InsertAndFindBestMatch()
153 base + dictLimit, in LZ4HC_InsertAndFindBestMatch()
158 *matchpos = base + matchIndex; in LZ4HC_InsertAndFindBestMatch()
[all …]
Dlz4_compress.c189 const BYTE *base; in LZ4_compress_generic() local
215 base = (const BYTE *)source; in LZ4_compress_generic()
219 base = (const BYTE *)source - dictPtr->currentOffset; in LZ4_compress_generic()
223 base = (const BYTE *)source - dictPtr->currentOffset; in LZ4_compress_generic()
240 LZ4_putPosition(ip, dictPtr->hashTable, tableType, base); in LZ4_compress_generic()
267 tableType, base); in LZ4_compress_generic()
282 tableType, base); in LZ4_compress_generic()
398 LZ4_putPosition(ip - 2, dictPtr->hashTable, tableType, base); in LZ4_compress_generic()
402 tableType, base); in LZ4_compress_generic()
414 LZ4_putPosition(ip, dictPtr->hashTable, tableType, base); in LZ4_compress_generic()
[all …]
/lib/math/
Dint_pow.c19 u64 int_pow(u64 base, unsigned int exp) in int_pow() argument
25 result *= base; in int_pow()
27 base *= base; in int_pow()
Ddiv64.c29 uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base) in __div64_32() argument
32 uint64_t b = base; in __div64_32()
38 if (high >= base) { in __div64_32()
39 high /= base; in __div64_32()
41 rem -= (uint64_t) (high*base) << 32; in __div64_32()
/lib/zstd/
Dcompress.c55 const BYTE *base; /* All regular indexes relative to this position */ member
219 U32 const end = (U32)(cctx->nextSrc - cctx->base); in ZSTD_continueCCtx()
293 zc->base = NULL; in ZSTD_resetCCtx_advanced()
373 dstCCtx->base = srcCCtx->base; in ZSTD_copyCCtx()
996 const BYTE *const base = zc->base; in ZSTD_fillHashTable() local
997 const BYTE *ip = base + zc->nextToUpdate; in ZSTD_fillHashTable()
1002 hashTable[ZSTD_hashPtr(ip, hBits, mls)] = (U32)(ip - base); in ZSTD_fillHashTable()
1013 const BYTE *const base = cctx->base; in ZSTD_compressBlock_fast_generic() local
1018 const BYTE *const lowest = base + lowestIndex; in ZSTD_compressBlock_fast_generic()
1038 U32 const curr = (U32)(ip - base); in ZSTD_compressBlock_fast_generic()
[all …]
Dzstd_opt.h219 const BYTE *const base = zc->base; in ZSTD_insertAndFindFirstIndexHash3() local
221 const U32 target = zc->nextToUpdate3 = (U32)(ip - base); in ZSTD_insertAndFindFirstIndexHash3()
225 hashTable3[ZSTD_hash3Ptr(base + idx, hashLog3)] = idx; in ZSTD_insertAndFindFirstIndexHash3()
238 const BYTE *const base = zc->base; in ZSTD_insertBtAndGetAllMatches() local
239 const U32 curr = (U32)(ip - base); in ZSTD_insertBtAndGetAllMatches()
251 const BYTE *const prefixStart = base + dictLimit; in ZSTD_insertBtAndGetAllMatches()
269 match = base + matchIndex3; in ZSTD_insertBtAndGetAllMatches()
301 match = base + matchIndex; in ZSTD_insertBtAndGetAllMatches()
309 match = base + matchIndex; /* to prepare for next usage of match[matchLength] */ in ZSTD_insertBtAndGetAllMatches()
359 if (ip < zc->base + zc->nextToUpdate) in ZSTD_BtGetAllMatches()
[all …]
Ddecompress.c84 const void *base; /* start of curr segment */ member
111 dctx->base = NULL; in ZSTD_decompressBegin()
874 const BYTE *base; member
880 …onst oend, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const base, in ZSTD_execSequenceLast7() argument
908 if (sequence.offset > (size_t)(oLitEnd - base)) { in ZSTD_execSequenceLast7()
912 match = dictEnd - (base - match); in ZSTD_execSequenceLast7()
923 match = base; in ZSTD_execSequenceLast7()
1007 …onst oend, seq_t sequence, const BYTE **litPtr, const BYTE *const litLimit, const BYTE *const base, in ZSTD_execSequence() argument
1023 return ZSTD_execSequenceLast7(op, oend, sequence, litPtr, litLimit, base, vBase, dictEnd); in ZSTD_execSequence()
1034 if (sequence.offset > (size_t)(oLitEnd - base)) { in ZSTD_execSequence()
[all …]
Dhuf_compress.c385 U32 base; member
397 rank[r].base++; in HUF_sort()
400 rank[n - 1].base += rank[n].base; in HUF_sort()
402 rank[n].curr = rank[n].base; in HUF_sort()
407 while ((pos > rank[r].base) && (c > huffNode[pos - 1].count)) in HUF_sort()
/lib/zlib_inflate/
Dinftrees.c41 const unsigned short *base; /* base value table to use */ in zlib_inflate_table() local
170 base = extra = work; /* dummy value--not used */ in zlib_inflate_table()
174 base = lbase; in zlib_inflate_table()
175 base -= 257; in zlib_inflate_table()
181 base = dbase; in zlib_inflate_table()
211 this.val = base[work[sym]]; in zlib_inflate_table()
/lib/mpi/
Dmpi-pow.c24 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod) in mpi_powm() argument
79 bsize = base->nlimbs; in mpi_powm()
80 bsign = base->sign; in mpi_powm()
87 MPN_COPY(bp, base->d, bsize); in mpi_powm()
96 bp = base->d; in mpi_powm()
159 negative_result = (ep[0] & 1) && base->sign; in mpi_powm()
/lib/zlib_deflate/
Ddeftree.c416 int base = desc->stat_desc->extra_base; in gen_bitlen() local
443 if (n >= base) xbits = extra[n-base]; in gen_bitlen()