Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81d79bec authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Linus Torvalds
Browse files

[PATCH] V850: user ARRAY_SIZE macro when appropriate



Use ARRAY_SIZE macro already defined in linux/kernel.h

Signed-off-by: default avatarAhmed S. Darwish <darwish.07@gmail.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6e6d74cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
	{ "ST",  IRQ_INTST(0), 	IRQ_INTST_NUM, 	3, 5 },
	{ 0 }
};
#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)

static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];

+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
	{ "ST",  IRQ_INTST(0), 	IRQ_INTST_NUM, 	3, 5 },
	{ 0 }
};
#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)

static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];

+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ struct v850e_intc_irq_init irq_inits[] = {
	{ "RPU", IRQ_RPU(0),	IRQ_RPU_NUM,	1, 6 },
	{ 0 }
};
#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)

struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];

+3 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/signal.h>
#include <linux/kernel.h>

#include <asm/machdep.h>

@@ -36,7 +37,7 @@ struct used_gint {
	{ 1, GBUS_INT_PRIORITY_HIGH },
	{ 3, GBUS_INT_PRIORITY_LOW }
};
#define NUM_USED_GINTS	(sizeof used_gint / sizeof used_gint[0])
#define NUM_USED_GINTS ARRAY_SIZE(used_gint)

/* A table of which GINT is used by each GBUS interrupts (they are
   assigned based on priority).  */
@@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
	{ "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
	{ 0 }
};
#define NUM_GBUS_IRQ_INITS  \
   ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)

static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];

+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
	{ "ST",  IRQ_INTST(0), 	IRQ_INTST_NUM, 	4, 5 },
	{ 0 }
};
#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)

static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];

Loading