/* Calculate a simple 8-bit checksum of a data block */
int cros_ec_calc_checksum(const uint8_t *data, int size)
/* Calculate a simple 8-bit checksum of a data block */
int cros_ec_calc_checksum(const uint8_t *data, int size)
{
	int csum, i;
	for (i = csum = 0; i < size; i++)
		csum += data[i];
	return csum & 0xff;
}