Also update old hunks to match on igt logging instead of fprintf. v2: Don't forget about perror. Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx> --- lib/igt.cocci | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/igt.cocci b/lib/igt.cocci index a5f7c2dbfbce..97aa43f9f057 100644 --- a/lib/igt.cocci +++ b/lib/igt.cocci @@ -4,7 +4,13 @@ expression Ec; expression list[n] Ep; @@ - if (Ec) { -- fprintf( stderr, Ep ); +( +- igt_warn( Ep ); +| +- igt_info( Ep ); +| +- igt_debug( Ep ); +) - igt_fail(...); - } + igt_assert_f(Ec, Ep); @@ -16,3 +22,25 @@ expression list[n] Ep; - igt_skip(Ep); - } + igt_skip_on_f(Ec, Ep); + +// Enforce use of logging functions +@@ +expression list[n] Ep; +@@ +-fprintf(stderr, Ep); ++igt_warn(Ep); +@@ +expression E; +@@ +-perror(E); ++igt_warn(E); +@@ +expression list[n] Ep; +@@ +-fprintf(stdout, Ep); ++igt_info(Ep); +@@ +expression list[n] Ep; +@@ +-printf(Ep); ++igt_info(Ep); -- 2.0.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx