aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/au1000/common/dbdma.c2
-rw-r--r--arch/mips/kernel/kspd.c3
-rw-r--r--arch/mips/philips/pnx8550/common/setup.c2
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/setup.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index edf91f41a786..428ed275a0f6 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[] = {
179 { 0, 0, 0, 0, 0, 0, 0 }, 179 { 0, 0, 0, 0, 0, 0, 0 },
180}; 180};
181 181
182#define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t)) 182#define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
183 183
184static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS]; 184static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS];
185 185
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c
index d2c2e00e5864..f6704ab16306 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)
161 int i; 161 int i;
162 unsigned int ret = 0; 162 unsigned int ret = 0;
163 163
164 for (i = 0; i < (sizeof(open_flags_table) / sizeof(struct apsp_table)); 164 for (i = 0; i < ARRAY_SIZE(open_flags_table); i++) {
165 i++) {
166 if( (flags & open_flags_table[i].sp) ) { 165 if( (flags & open_flags_table[i].sp) ) {
167 ret |= open_flags_table[i].ap; 166 ret |= open_flags_table[i].ap;
168 } 167 }
diff --git a/arch/mips/philips/pnx8550/common/setup.c b/arch/mips/philips/pnx8550/common/setup.c
index 2ce298f4d19a..92d764c97701 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[] = {
74 }, 74 },
75}; 75};
76 76
77#define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) 77#define STANDARD_IO_RESOURCES ARRAY_SIZE(standard_io_resources)
78 78
79extern struct resource pci_io_resource; 79extern struct resource pci_io_resource;
80extern struct resource pci_mem_resource; 80extern struct resource pci_mem_resource;
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
index 58e47686b499..f14bea8daf90 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[] = {
50 } 50 }
51}; 51};
52 52
53#define number_partitions (sizeof(cmbvr4133_mtd_parts)/sizeof(struct mtd_partition)) 53#define number_partitions ARRAY_SIZE(cmbvr4133_mtd_parts)
54#endif 54#endif
55 55
56extern void i8259_init(void); 56extern void i8259_init(void);