Re: [PATCH] coccinelle: api: add devm_platform_ioremap_resource script

From: Markus Elfring
Date: Sat Apr 06 2019 - 08:37:03 EST


> +// Copyright: (C) 2019 Himanshu Jha GPLv2.

How do you think about to use a SPDX identifier?


> +// ---â

I would prefer a SmPL script without such comment lines as delimiters here.


> +position j0;

Would the variable name âpâ be nicer?


> +@script:python depends on report && !patch@
> +e1 << r2.e1;
> +j0 << r2.j0;
> +@@
> +
> +msg = "WARNING: Use devm_platform_ioremap_resource for %s" % (e1)
> +coccilib.report.print_report(j0[0], msg)

I suggest to print such a message without the extra variable âmsgâ
because the string format expression can be passed directly.

Regards,
Markus