Lines Matching refs:swap_bits
118 static u8 swap_bits(struct bch_control *bch, u8 in) in swap_bits() function
120 if (!bch->swap_bits) in swap_bits()
138 u8 tmp = swap_bits(bch, *data++); in bch_encode_unaligned()
159 dst[i] = ((u32)swap_bits(bch, src[0]) << 24) | in load_ecc8()
160 ((u32)swap_bits(bch, src[1]) << 16) | in load_ecc8()
161 ((u32)swap_bits(bch, src[2]) << 8) | in load_ecc8()
162 swap_bits(bch, src[3]); in load_ecc8()
165 dst[nwords] = ((u32)swap_bits(bch, pad[0]) << 24) | in load_ecc8()
166 ((u32)swap_bits(bch, pad[1]) << 16) | in load_ecc8()
167 ((u32)swap_bits(bch, pad[2]) << 8) | in load_ecc8()
168 swap_bits(bch, pad[3]); in load_ecc8()
181 *dst++ = swap_bits(bch, src[i] >> 24); in store_ecc8()
182 *dst++ = swap_bits(bch, src[i] >> 16); in store_ecc8()
183 *dst++ = swap_bits(bch, src[i] >> 8); in store_ecc8()
184 *dst++ = swap_bits(bch, src[i]); in store_ecc8()
186 pad[0] = swap_bits(bch, src[nwords] >> 24); in store_ecc8()
187 pad[1] = swap_bits(bch, src[nwords] >> 16); in store_ecc8()
188 pad[2] = swap_bits(bch, src[nwords] >> 8); in store_ecc8()
189 pad[3] = swap_bits(bch, src[nwords]); in store_ecc8()
261 if (bch->swap_bits) in bch_encode()
262 w = (u32)swap_bits(bch, w) | in bch_encode()
263 ((u32)swap_bits(bch, w >> 8) << 8) | in bch_encode()
264 ((u32)swap_bits(bch, w >> 16) << 16) | in bch_encode()
265 ((u32)swap_bits(bch, w >> 24) << 24); in bch_encode()
1074 if (!bch->swap_bits) in bch_decode()
1286 bool swap_bits) in bch_init() argument
1351 bch->swap_bits = swap_bits; in bch_init()