kernel endian cleanup