]> asedeno.scripts.mit.edu Git - linux.git/commit
tracing: Use ARRAY_SIZE() macro instead of open coding it
authorJérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Mon, 16 Oct 2017 01:22:49 +0000 (21:22 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 11 Apr 2018 15:30:33 +0000 (11:30 -0400)
commit0a4d0564f0fc377ad0ba66ce214b9b16324aea4b
tree31dc7eec2d77568c347f82ef4024434a0126f1cb
parentb0dc52f15e7fe2b973ecfe4f3706f1b35ce3943a
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: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
[ Removed useless include of kernel.h ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_filter.c