Lines Matching defs:sum
217 unsigned long sum;
224 sum = 0;
233 sum += value;
235 if (sum > 0xFFFF) {
236 sum = (sum + (sum >> 16)) & 0xFFFF;
239 return (~cpu_to_le16(sum)) & 0xFFFF;
242 uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new)
245 sum = ~sum & 0xFFFF;
248 /* byte swap the sum if it came from an odd offset
254 checksum = sum + new;