Re: coccinelle: api/devm_platform_ioremap_resource: remove useless script

From: Masahiro Yamada
Date: Thu Oct 24 2019 - 11:41:51 EST

On Sun, Oct 20, 2019 at 7:13 AM Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Sat, 2019-10-19 at 21:43 +0100, Marc Zyngier wrote:
> > Providing Coccinelle scripts that scream about perfectly valid code is
> > pointless, and the result is actively harmful.
> Doubtful.
> If the new code is smaller object code and correct
> than the conversion is worthwhile.

I agree.

We use multi-platform defconfig.
I always appreciate the code refactoring
that reduces the object size.

> fyi:
> There are already ~450 uses of this function and maybe
> ~800 possible additional conversions.
> > If said script was providing a correct semantic patch instead of being
> > an incentive for people to churn untested patches that span the whole
> > tree, that'd be a different story.
> Right.

Alexandre Belloni used
as a reference, but this is not the output from coccicheck.
The patch author just created a wrong patch by hand.

The deleted semantic patch supports MODE=patch,
which creates a correct patch, and is useful.

Best Regards
Masahiro Yamada