lib/util: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: I0648f245166a0e7b427ede54547a186bee9adf41 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2303 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
2fe1348d6a
commit
b869b4b96b
@ -78,13 +78,13 @@ spdk_bit_array_free(struct spdk_bit_array **bap)
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
spdk_bit_array_word_count(uint32_t num_bits)
|
||||
bit_array_word_count(uint32_t num_bits)
|
||||
{
|
||||
return (num_bits + SPDK_BIT_ARRAY_WORD_BITS - 1) >> SPDK_BIT_ARRAY_WORD_INDEX_SHIFT;
|
||||
}
|
||||
|
||||
static inline spdk_bit_array_word
|
||||
spdk_bit_array_word_mask(uint32_t num_bits)
|
||||
bit_array_word_mask(uint32_t num_bits)
|
||||
{
|
||||
assert(num_bits < SPDK_BIT_ARRAY_WORD_BITS);
|
||||
return (SPDK_BIT_ARRAY_WORD_C(1) << num_bits) - 1;
|
||||
@ -105,7 +105,7 @@ spdk_bit_array_resize(struct spdk_bit_array **bap, uint32_t num_bits)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
new_word_count = spdk_bit_array_word_count(num_bits);
|
||||
new_word_count = bit_array_word_count(num_bits);
|
||||
new_size = offsetof(struct spdk_bit_array, words) + new_word_count * SPDK_BIT_ARRAY_WORD_BYTES;
|
||||
|
||||
/*
|
||||
@ -132,7 +132,7 @@ spdk_bit_array_resize(struct spdk_bit_array **bap, uint32_t num_bits)
|
||||
old_word_count = 0;
|
||||
new_ba->bit_count = 0;
|
||||
} else {
|
||||
old_word_count = spdk_bit_array_word_count(new_ba->bit_count);
|
||||
old_word_count = bit_array_word_count(new_ba->bit_count);
|
||||
}
|
||||
|
||||
if (new_word_count > old_word_count) {
|
||||
@ -145,7 +145,7 @@ spdk_bit_array_resize(struct spdk_bit_array **bap, uint32_t num_bits)
|
||||
spdk_bit_array_word mask;
|
||||
|
||||
last_word_bits = num_bits & SPDK_BIT_ARRAY_WORD_INDEX_MASK;
|
||||
mask = spdk_bit_array_word_mask(last_word_bits);
|
||||
mask = bit_array_word_mask(last_word_bits);
|
||||
new_ba->words[old_word_count - 1] &= mask;
|
||||
}
|
||||
|
||||
@ -236,7 +236,7 @@ _spdk_bit_array_find_first(const struct spdk_bit_array *ba, uint32_t start_bit_i
|
||||
* within the first word.
|
||||
*/
|
||||
first_word_bit_index = start_bit_index & SPDK_BIT_ARRAY_WORD_INDEX_MASK;
|
||||
first_word_mask = spdk_bit_array_word_mask(first_word_bit_index);
|
||||
first_word_mask = bit_array_word_mask(first_word_bit_index);
|
||||
|
||||
word = (*cur_word ^ xor_mask) & ~first_word_mask;
|
||||
|
||||
@ -292,7 +292,7 @@ uint32_t
|
||||
spdk_bit_array_count_set(const struct spdk_bit_array *ba)
|
||||
{
|
||||
const spdk_bit_array_word *cur_word = ba->words;
|
||||
uint32_t word_count = spdk_bit_array_word_count(ba->bit_count);
|
||||
uint32_t word_count = bit_array_word_count(ba->bit_count);
|
||||
uint32_t set_count = 0;
|
||||
|
||||
while (word_count--) {
|
||||
|
@ -642,7 +642,7 @@ crc_update_fast(uint16_t crc, const void *data, size_t data_len)
|
||||
}
|
||||
|
||||
static inline uint16_t
|
||||
spdk_crc16_table_t10dif(uint16_t init_crc, const void *buf, size_t len)
|
||||
crc16_table_t10dif(uint16_t init_crc, const void *buf, size_t len)
|
||||
{
|
||||
uint16_t crc;
|
||||
const uint8_t *data = (const uint8_t *)buf;
|
||||
@ -655,14 +655,14 @@ spdk_crc16_table_t10dif(uint16_t init_crc, const void *buf, size_t len)
|
||||
uint16_t
|
||||
spdk_crc16_t10dif(uint16_t init_crc, const void *buf, size_t len)
|
||||
{
|
||||
return (spdk_crc16_table_t10dif(init_crc, buf, len));
|
||||
return (crc16_table_t10dif(init_crc, buf, len));
|
||||
}
|
||||
|
||||
uint16_t
|
||||
spdk_crc16_t10dif_copy(uint16_t init_crc, uint8_t *dst, uint8_t *src, size_t len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
return (spdk_crc16_table_t10dif(init_crc, src, len));
|
||||
return (crc16_table_t10dif(init_crc, src, len));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
static struct spdk_crc32_table g_crc32_ieee_table;
|
||||
|
||||
__attribute__((constructor)) static void
|
||||
spdk_crc32_ieee_init(void)
|
||||
crc32_ieee_init(void)
|
||||
{
|
||||
crc32_table_init(&g_crc32_ieee_table, SPDK_CRC32_POLYNOMIAL_REFLECT);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ spdk_crc32c_update(const void *buf, size_t len, uint32_t crc)
|
||||
static struct spdk_crc32_table g_crc32c_table;
|
||||
|
||||
__attribute__((constructor)) static void
|
||||
spdk_crc32c_init(void)
|
||||
crc32c_init(void)
|
||||
{
|
||||
crc32_table_init(&g_crc32c_table, SPDK_CRC32C_POLYNOMIAL_REFLECT);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user