Re: [PATCH] tile: use ARRAY_SIZE

From: Chris Metcalf
Date: Mon Jun 16 2014 - 16:20:32 EST


On 6/16/2014 4:12 PM, Himangi Saraogi wrote:
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@xxxxxxxxx>
Acked-by: Julia Lawall <julia.lawall@xxxxxxx>
---
Not compile tested.
arch/tile/kernel/traps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, taken into the tile tree.

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/