summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-06-16 20:12:24 (GMT)
committerChris Metcalf <cmetcalf@tilera.com>2014-10-02 14:19:32 (GMT)
commit367b9380b1717dc53ea7e1f05da58c99e0ae54a3 (patch)
tree9717790a07980b62dddbea6b710a842848344b3e
parentfe82dcec644244676d55a1384c958d5f67979adb (diff)
downloadlinux-367b9380b1717dc53ea7e1f05da58c99e0ae54a3.tar.xz
tile: use ARRAY_SIZE
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type or the size of its first element. The semantic patch that makes this change is as follows: // <smpl> @i@ @@ @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
-rw-r--r--arch/tile/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c
index f3ceb63..86900cc 100644
--- a/arch/tile/kernel/traps.c
+++ b/arch/tile/kernel/traps.c
@@ -277,7 +277,7 @@ void __kprobes do_trap(struct pt_regs *regs, int fault_num,
if (fixup_exception(regs)) /* ILL_TRANS or UNALIGN_DATA */
return;
if (fault_num >= 0 &&
- fault_num < sizeof(int_name)/sizeof(int_name[0]) &&
+ fault_num < ARRAY_SIZE(int_name) &&
int_name[fault_num] != NULL)
name = int_name[fault_num];
else