X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=arch%2Ftile%2Flib%2Fchecksum.c;h=c3ca3e64d9d906b453a6be36979ef8d5e976447a;hb=2e3ee613480563a6d5c01b57d342e65cc58c06df;hp=e4bab5bd3f316a54d050e56abe14bc31ba31aaff;hpb=00527cc6bbcac05ab7d54c40bda1ff2a0625ab10;p=~andy%2Flinux diff --git a/arch/tile/lib/checksum.c b/arch/tile/lib/checksum.c index e4bab5bd3f3..c3ca3e64d9d 100644 --- a/arch/tile/lib/checksum.c +++ b/arch/tile/lib/checksum.c @@ -16,19 +16,6 @@ #include #include -static inline unsigned int longto16(unsigned long x) -{ - unsigned long ret; -#ifdef __tilegx__ - ret = __insn_v2sadu(x, 0); - ret = __insn_v2sadu(ret, 0); -#else - ret = __insn_sadh_u(x, 0); - ret = __insn_sadh_u(ret, 0); -#endif - return ret; -} - __wsum do_csum(const unsigned char *buff, int len) { int odd, count; @@ -94,7 +81,7 @@ __wsum do_csum(const unsigned char *buff, int len) } if (len & 1) result += *buff; - result = longto16(result); + result = csum_long(result); if (odd) result = swab16(result); out: