Lines Matching refs:swap_bits
152 static u8 swap_bits(struct bch_control *bch, u8 in) in swap_bits() function
154 if (!bch->swap_bits) in swap_bits()
172 u8 tmp = swap_bits(bch, *data++); in bch_encode_unaligned()
193 dst[i] = ((u32)swap_bits(bch, src[0]) << 24) | in load_ecc8()
194 ((u32)swap_bits(bch, src[1]) << 16) | in load_ecc8()
195 ((u32)swap_bits(bch, src[2]) << 8) | in load_ecc8()
196 swap_bits(bch, src[3]); in load_ecc8()
199 dst[nwords] = ((u32)swap_bits(bch, pad[0]) << 24) | in load_ecc8()
200 ((u32)swap_bits(bch, pad[1]) << 16) | in load_ecc8()
201 ((u32)swap_bits(bch, pad[2]) << 8) | in load_ecc8()
202 swap_bits(bch, pad[3]); in load_ecc8()
215 *dst++ = swap_bits(bch, src[i] >> 24); in store_ecc8()
216 *dst++ = swap_bits(bch, src[i] >> 16); in store_ecc8()
217 *dst++ = swap_bits(bch, src[i] >> 8); in store_ecc8()
218 *dst++ = swap_bits(bch, src[i]); in store_ecc8()
220 pad[0] = swap_bits(bch, src[nwords] >> 24); in store_ecc8()
221 pad[1] = swap_bits(bch, src[nwords] >> 16); in store_ecc8()
222 pad[2] = swap_bits(bch, src[nwords] >> 8); in store_ecc8()
223 pad[3] = swap_bits(bch, src[nwords]); in store_ecc8()
295 if (bch->swap_bits) in bch_encode()
296 w = (u32)swap_bits(bch, w) | in bch_encode()
297 ((u32)swap_bits(bch, w >> 8) << 8) | in bch_encode()
298 ((u32)swap_bits(bch, w >> 16) << 16) | in bch_encode()
299 ((u32)swap_bits(bch, w >> 24) << 24); in bch_encode()
1108 if (!bch->swap_bits) in bch_decode()
1320 bool swap_bits) in bch_init() argument
1385 bch->swap_bits = swap_bits; in bch_init()