summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/spufs/coredump.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-09-19 04:38:12 (GMT)
committerPaul Mackerras <paulus@samba.org>2007-09-19 05:12:18 (GMT)
commit936d5bf1d7dc69c56bf79ad68819e597307a1884 (patch)
tree44ddc4a6785cb1f5a9c7387ff8d97c6881517de0 /arch/powerpc/platforms/cell/spufs/coredump.c
parentc1a72173ab156306666cb531f891f32e4e21d592 (diff)
downloadlinux-936d5bf1d7dc69c56bf79ad68819e597307a1884.tar.xz
[POWERPC] spufs: Get rid of spufs_coredump_num_notes, it's not needed if we NULL terminate
The spufs_coredump_read array is NULL terminated, and we also store the size. We only need one or the other, and the other arrays in file.c are NULL terminated, so do that. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/coredump.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index 52d6219..fc988fd 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -72,7 +72,7 @@ static int spufs_ctx_note_size(struct spu_context *ctx, int dfd)
char *name;
char fullname[80];
- for (i = 0; spufs_coredump_read[i].name; i++) {
+ for (i = 0; spufs_coredump_read[i].name != NULL; i++) {
name = spufs_coredump_read[i].name;
sz = spufs_coredump_read[i].size;
@@ -194,7 +194,7 @@ static void spufs_arch_write_notes(struct file *file)
while ((ctx = coredump_next_context(&fd)) != NULL) {
spu_acquire_saved(ctx);
- for (j = 0; j < spufs_coredump_num_notes; j++)
+ for (j = 0; spufs_coredump_read[j].name != NULL; j++)
spufs_arch_write_note(ctx, j, file, fd);
spu_release_saved(ctx);