On 3/3/20 7:36 PM, Peter Maydell wrote:
On Tue, 3 Mar 2020 at 18:33, Philippe Mathieu-Daudé <phi...@redhat.com> wrote:
Nitpick: you don't need to include the bracket symbol in the diff:

    @@
    -resetfn(CPUState *cpu)
    +resetfn(DeviceState *dev)
     {

(simply indent it with a space).

I think this was probably leftover from trying to get Coccinelle
to not rewrap the '{' onto the previous line, before I found
--smpl-spacing.

In general I don't find it terribly useful to spend a great
deal of time streamlining Coccinelle scripts -- I think they
are basically one-shot uses almost all of the time, so once
they're producing the right changes I prefer to move on.

I agree in this case it is not useful to add the script to the repository as a file, because the cleanup is done (as you said, 'one-shot script'). The script is however valuable as in the commit description.

Cleaning it up is not for performance, but as the script is buried into the git repository, it can (and will) be used as reference/example by other developers.

Anyway this patch is queued now, so let's move on :)


Reply via email to