aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2009-03-03 19:39:32 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-11 17:11:32 +1100
commit2fb4423aa38b598fa688bbd53a835bb7628c445b (patch)
tree3d6797938459bde5008bf6b3fa45a95a81b96fc0 /arch/powerpc/platforms/cell
parentd219889b769a56901c9a916187ee0af95e6ff8a6 (diff)
powerpc/spufs: Fix incorrect buffer offset in regs write
We need to offset by *pos bytes, not *pos words. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c
index be0120d9b50..d6a519e6e1c 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -578,7 +578,7 @@ spufs_regs_write(struct file *file, const char __user *buffer,
if (ret)
return ret;
- ret = copy_from_user(lscsa->gprs + *pos - size,
+ ret = copy_from_user((char *)lscsa->gprs + *pos - size,
buffer, size) ? -EFAULT : size;
spu_release_saved(ctx);