[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cpu: Use DeviceClass reset instead of a special CPUClass res

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] cpu: Use DeviceClass reset instead of a special CPUClass reset
Date: Wed, 4 Mar 2020 01:10:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/3/20 7:36 PM, Peter Maydell wrote:
On Tue, 3 Mar 2020 at 18:33, Philippe Mathieu-Daudé <address@hidden> 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

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

[Prev in Thread] Current Thread [Next in Thread]