Lines Matching full:sum
10 static u64 accumulate(u64 sum, u64 data) in accumulate() argument
12 sum += data; in accumulate()
13 if (sum < data) in accumulate()
14 sum += 1; in accumulate()
15 return sum; in accumulate()
24 unsigned int offset, shift, sum; in do_csum() local
112 sum = sum64 >> 32; in do_csum()
113 sum += (sum >> 16) | (sum << 16); in do_csum()
115 return (u16)swab32(sum); in do_csum()
117 return sum >> 16; in do_csum()
125 u64 sum = (__force u64)csum; in csum_ipv6_magic() local
130 sum += (__force u32)htonl(len); in csum_ipv6_magic()
131 sum += (u32)proto << 24; in csum_ipv6_magic()
135 sum = accumulate(sum, src >> 64); in csum_ipv6_magic()
136 sum = accumulate(sum, dst >> 64); in csum_ipv6_magic()
138 sum += ((sum >> 32) | (sum << 32)); in csum_ipv6_magic()
139 return csum_fold((__force __wsum)(sum >> 32)); in csum_ipv6_magic()