Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=936d5bf1d7dc69c56bf79ad68819e597307a1884
Commit:     936d5bf1d7dc69c56bf79ad68819e597307a1884
Parent:     c1a72173ab156306666cb531f891f32e4e21d592
Author:     Michael Ellerman <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 19 14:38:12 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Sep 19 15:12:18 2007 +1000

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/coredump.c |    4 ++--
 arch/powerpc/platforms/cell/spufs/file.c     |    4 +---
 2 files changed, 3 insertions(+), 5 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);
diff --git a/arch/powerpc/platforms/cell/spufs/file.c 
b/arch/powerpc/platforms/cell/spufs/file.c
index 85edbec..6095fb1 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2250,7 +2250,5 @@ struct spufs_coredump_reader spufs_coredump_read[] = {
        { "proxydma_info", __spufs_proxydma_info_read,
                           NULL, sizeof(struct spu_proxydma_info)},
        { "object-id", NULL, __spufs_object_id_get, 19 },
-       { },
+       { NULL },
 };
-int spufs_coredump_num_notes = ARRAY_SIZE(spufs_coredump_read) - 1;
-
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to