Re: [PATCH v2] Coccinelle: api: Add SmPL script “use_devm_platform_get_and_ioremap_resource.cocci”

From: Julia Lawall
Date: Mon Sep 07 2020 - 13:31:49 EST




On Mon, 7 Sep 2020, Markus Elfring wrote:

> >> +++ b/scripts/coccinelle/api/use_devm_platform_get_and_ioremap_resource.cocci
> >> @@ -0,0 +1,48 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/// Simplify a function call combination by using a known wrapper function.
> >> +//
> >> +// Keywords: wrapper function conversion ioremap resources
> >> +// Confidence: High
> >
> > Shouldn't there be some options? --no-includes and perhaps
> > --include-headers would seem reasonable.
>
> I imagine that the proposed source code transformation can work also without
> additional semantic patch command options.

It can. But it will be more efficient and more exhaustive if you include
them.

julia