Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b22c034d04d3632a339d14d5803c8f94e412608
Commit:     2b22c034d04d3632a339d14d5803c8f94e412608
Parent:     161548bf3529d53398adb3451cdc781cc324fc1d
Author:     Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 21:36:44 2007 +0200
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jan 29 10:14:54 2008 +0000

    [MIPS] Converting most array size calculations to use ARRAY_SIZE().
    
    Signed-off-by: Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/au1000/common/dbdma.c          |    2 +-
 arch/mips/kernel/kspd.c                  |    3 +--
 arch/mips/philips/pnx8550/common/setup.c |    2 +-
 arch/mips/vr41xx/nec-cmbvr4133/setup.c   |    2 +-
 4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index edf91f4..428ed27 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -179,7 +179,7 @@ static dbdev_tab_t dbdev_tab[] = {
        { 0, 0, 0, 0, 0, 0, 0 },
 };
 
-#define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t))
+#define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
 
 static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS];
 
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index d2c2e00..f6704ab 100644
--- a/arch/mips/kernel/kspd.c
+++ b/arch/mips/kernel/kspd.c
@@ -161,8 +161,7 @@ static unsigned int translate_open_flags(int flags)
        int i;
        unsigned int ret = 0;
 
-       for (i = 0; i < (sizeof(open_flags_table) / sizeof(struct apsp_table));
-            i++) {
+       for (i = 0; i < ARRAY_SIZE(open_flags_table); i++) {
                if( (flags & open_flags_table[i].sp) ) {
                        ret |= open_flags_table[i].ap;
                }
diff --git a/arch/mips/philips/pnx8550/common/setup.c 
b/arch/mips/philips/pnx8550/common/setup.c
index 2ce298f..92d764c 100644
--- a/arch/mips/philips/pnx8550/common/setup.c
+++ b/arch/mips/philips/pnx8550/common/setup.c
@@ -74,7 +74,7 @@ struct resource standard_io_resources[] = {
        },
 };
 
-#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct 
resource))
+#define STANDARD_IO_RESOURCES ARRAY_SIZE(standard_io_resources)
 
 extern struct resource pci_io_resource;
 extern struct resource pci_mem_resource;
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c 
b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
index 58e4768..f14bea8 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/setup.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
@@ -50,7 +50,7 @@ static struct mtd_partition cmbvr4133_mtd_parts[] = {
        }
 };
 
-#define number_partitions (sizeof(cmbvr4133_mtd_parts)/sizeof(struct 
mtd_partition))
+#define number_partitions ARRAY_SIZE(cmbvr4133_mtd_parts)
 #endif
 
 extern void i8259_init(void);
-
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