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

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