Skip to content
Commit 0a4d0564 authored by Jérémy Lefaure's avatar Jérémy Lefaure Committed by Steven Rostedt (VMware)
Browse files

tracing: Use ARRAY_SIZE() macro instead of open coding it

It is useless to re-invent the ARRAY_SIZE macro so let's use it instead
of DATA_CNT.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Link: http://lkml.kernel.org/r/20171016012250.26453-1-jeremy.lefaure@lse.epita.fr



Signed-off-by: default avatarJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
[ Removed useless include of kernel.h ]
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent b0dc52f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment