Home
last modified time | relevance | path

Searched refs:c_sum (Results 1 – 1 of 1) sorted by relevance

/Linux-v4.19/arch/powerpc/kernel/
Dnvram_64.c884 unsigned int c_sum, c_sum2; in nvram_checksum() local
886 c_sum = p->signature + p->length + sp[0] + sp[1] + sp[2] + sp[3] + sp[4] + sp[5]; in nvram_checksum()
889 c_sum = ((c_sum & 0xffff) + (c_sum >> 16)) & 0xffff; in nvram_checksum()
891 c_sum2 = (c_sum >> 8) + (c_sum << 8); in nvram_checksum()
892 c_sum = ((c_sum + c_sum2) >> 8) & 0xff; in nvram_checksum()
893 return c_sum; in nvram_checksum()
1129 unsigned char c_sum; in nvram_scan_partitions() local
1160 c_sum = nvram_checksum(&phead); in nvram_scan_partitions()
1161 if (c_sum != phead.checksum) { in nvram_scan_partitions()
1164 phead.checksum, c_sum); in nvram_scan_partitions()