]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix string library functions
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 18 May 2010 08:15:21 +0000 (08:15 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 21 May 2010 07:31:08 +0000 (17:31 +1000)
commitbc099638c61c113e5f5f9daf9ee9179df8d91d5e
tree14f6b84f0eca9909108d0dc222d0fb64fc437ee9
parent5189e9bde2867881772ec0dcc557aff8a60d7e92
powerpc: Fix string library functions

The powerpc strncmp implementation does not correctly handle a zero
length, despite the claim in 3b789942923915e17998e2a012bdecaf828decf1
(Add hand-coded assembly strcmp).

Additionally, all the length arguments are size_t, not int, so use
PPC_LCMPI and eq instead of cmpwi and le throughout.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/lib/string.S