aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/misc/array_size.cocci (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16Coccinelle: array_size: report even if include is missingJérémy Lefaure1-2/+2
Rule r does not depend on rule i (which is the include of linux/kernel.h) so the output should not depend on i in org and report mode. Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-18Coccinelle: array_size: reduce rule applicabilityJulia Lawall1-1/+1
Rule r is only use in org or report mode, so only execute it in those cases. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.com>
2014-08-06Coccinelle: Script to use ARRAY_SIZE instead of division of two sizeofsHimangi Saraogi1-0/+87
This script detects cases where ARRAY_SIZE can be used such as where there is a division of sizeof the array by the sizeof its first element or by any indexed element or the element type. It replaces the division of the two sizeofs by ARRAY_SIZE. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>