diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index ba6101ae73a2..3fcd06418b01 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -2026,13 +2026,13 @@ static const struct file_operations spufs_caps_fops = { | |||
2026 | static ssize_t __spufs_mbox_info_read(struct spu_context *ctx, | 2026 | static ssize_t __spufs_mbox_info_read(struct spu_context *ctx, |
2027 | char __user *buf, size_t len, loff_t *pos) | 2027 | char __user *buf, size_t len, loff_t *pos) |
2028 | { | 2028 | { |
2029 | u32 mbox_stat; | ||
2030 | u32 data; | 2029 | u32 data; |
2031 | 2030 | ||
2032 | mbox_stat = ctx->csa.prob.mb_stat_R; | 2031 | /* EOF if there's no entry in the mbox */ |
2033 | if (mbox_stat & 0x0000ff) { | 2032 | if (!(ctx->csa.prob.mb_stat_R & 0x0000ff)) |
2034 | data = ctx->csa.prob.pu_mb_R; | 2033 | return 0; |
2035 | } | 2034 | |
2035 | data = ctx->csa.prob.pu_mb_R; | ||
2036 | 2036 | ||
2037 | return simple_read_from_buffer(buf, len, pos, &data, sizeof data); | 2037 | return simple_read_from_buffer(buf, len, pos, &data, sizeof data); |
2038 | } | 2038 | } |
@@ -2066,13 +2066,13 @@ static const struct file_operations spufs_mbox_info_fops = { | |||
2066 | static ssize_t __spufs_ibox_info_read(struct spu_context *ctx, | 2066 | static ssize_t __spufs_ibox_info_read(struct spu_context *ctx, |
2067 | char __user *buf, size_t len, loff_t *pos) | 2067 | char __user *buf, size_t len, loff_t *pos) |
2068 | { | 2068 | { |
2069 | u32 ibox_stat; | ||
2070 | u32 data; | 2069 | u32 data; |
2071 | 2070 | ||
2072 | ibox_stat = ctx->csa.prob.mb_stat_R; | 2071 | /* EOF if there's no entry in the ibox */ |
2073 | if (ibox_stat & 0xff0000) { | 2072 | if (!(ctx->csa.prob.mb_stat_R & 0xff0000)) |
2074 | data = ctx->csa.priv2.puint_mb_R; | 2073 | return 0; |
2075 | } | 2074 | |
2075 | data = ctx->csa.priv2.puint_mb_R; | ||
2076 | 2076 | ||
2077 | return simple_read_from_buffer(buf, len, pos, &data, sizeof data); | 2077 | return simple_read_from_buffer(buf, len, pos, &data, sizeof data); |
2078 | } | 2078 | } |