core/psd/imx6ull/bch.c
static void load_ecc8(struct bch_control *bch, uint32_t *dst,
		      const uint8_t *src)
{
	uint8_t pad[4] = {0, 0, 0, 0};
	unsigned int i, nwords = BCH_ECC_WORDS(bch)-1;

	for (i = 0; i < nwords; i++, src += 4)
		dst[i] = (src[0] << 24)|(src[1] << 16)|(src[2] << 8)|src[3];

	memcpy(pad, src, BCH_ECC_BYTES(bch)-4*nwords);
	dst[nwords] = (pad[0] << 24)|(pad[1] << 16)|(pad[2] << 8)|pad[3];
}
/*
 * convert ecc bytes to aligned, zero-padded 32-bit ecc words
 */
convert ecc bytes to aligned, zero-padded 32-bit ecc words
convert ecc bytes to aligned zero - padded 32 - bit ecc words
static void load_ecc8(struct bch_control *bch, uint32_t *dst,
		      const uint8_t *src)
{
	uint8_t pad[4] = {0, 0, 0, 0};
	unsigned int i, nwords = BCH_ECC_WORDS(bch)-1;
	for (i = 0; i < nwords; i++, src += 4)
		dst[i] = (src[0] << 24)|(src[1] << 16)|(src[2] << 8)|src[3];
	memcpy(pad, src, BCH_ECC_BYTES(bch)-4*nwords);
	dst[nwords] = (pad[0] << 24)|(pad[1] << 16)|(pad[2] << 8)|pad[3];
}
static void load_ecc8 ( struct bch_control * bch , uint32_t * dst , const uint8_t * src ) { uint8_t pad [ 4 ] = { 0 , 0 , 0 , 0 } ; unsigned int i , nwords = BCH_ECC_WORDS ( bch ) - 1 ; for ( i = 0 ; i < nwords ; i ++ , src += 4 ) dst [ i ] = ( src [ 0 ] << 24 ) | ( src [ 1 ] << 16 ) | ( src [ 2 ] << 8 ) | src [ 3 ] ; memcpy ( pad , src , BCH_ECC_BYTES ( bch ) - 4 * nwords ) ; dst [ nwords ] = ( pad [ 0 ] << 24 ) | ( pad [ 1 ] << 16 ) | ( pad [ 2 ] << 8 ) | pad [ 3 ] ; }
convert ecc bytes to aligned, zero-padded 32-bit ecc words
convert ecc bytes to aligned zero - padded 32 - bit ecc words