patch-2.3.30 linux/arch/ppc/lib/checksum.S

Next file: linux/arch/ppc/mbx_defconfig
Previous file: linux/arch/ppc/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/arch/ppc/lib/checksum.S linux/arch/ppc/lib/checksum.S
@@ -24,13 +24,12 @@
  * len is in words and is always >= 5.
  */
 _GLOBAL(ip_fast_csum)
-	cmpi	0,r4,0
-	beq	10f
 	lwz	r0,0(r3)
 	lwzu	r5,4(r3)
-	addi	r4,r4,-2
+	addic.	r4,r4,-2
 	addc	r0,r0,r5
 	mtctr	r4
+	blelr-
 1:	lwzu	r4,4(r3)
 	adde	r0,r0,r4
 	bdnz	1b
@@ -40,8 +39,6 @@
 	not	r3,r3
 	srwi	r3,r3,16
 	blr
-10:	li	r3,0
-	blr	
 
 /*
  * Compute checksum of TCP or UDP pseudo-header:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)