aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2009-03-03 14:39:32 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-11 02:11:32 -0400
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 be0120d9b50a..d6a519e6e1c1 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,
578 if (ret) 578 if (ret)
579 return ret; 579 return ret;
580 580
581 ret = copy_from_user(lscsa->gprs + *pos - size, 581 ret = copy_from_user((char *)lscsa->gprs + *pos - size,
582 buffer, size) ? -EFAULT : size; 582 buffer, size) ? -EFAULT : size;
583 583
584 spu_release_saved(ctx); 584 spu_release_saved(ctx);