summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/api/pm_runtime.cocci
AgeCommit message (Collapse)AuthorFilesLines
2016-10-01Coccinelle: pm_runtime: ensure relevance of pm_runtime reportsJulia Lawall1-7/+11
pm_runtime.cocci starts with one rule that searches for a variety of functions calls, followed by various rules that report errors. Previously, the only connection between the first rule and the rest was to check that the first rule had matched somewhere. Change the rules to propagate a position from the first rule to the others, to make sure that the sites reported on are the same as the sites that were identified as having the relevant functions. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.com>
2016-02-18Coccinelle: pm_runtime: reduce rule applicabilityJulia Lawall1-1/+1
Rule r is only used 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>
2015-05-20coccinelle: pm_runtime: Insert blank lineFabio Estevam1-1/+1
Insert a blank line in order to improve the readability of the generated patch and also make it consistent with the other .cocci files. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-01-03scripts: Coccinelle script for pm_runtime_* return checks with IS_ERR_VALUENishanth Menon1-0/+109
As indicated by Sekhar in [1], there seems to be a tendency to use IS_ERR_VALUE to check the error result for pm_runtime_* functions which make no sense considering commit c48cd65 (ARM: OMAP: use consistent error checking) - the error values can either be < 0 for error OR 0, 1 in cases where we have success. So, setup a coccinelle script to help identify the same. [1] http://marc.info/?t=138472678100003&r=1&w=2 Cc: Russell King <rmk+kernel@arm.linux.org.uk> Reported-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>