[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci
From: |
Peter Maydell |
Subject: |
Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci |
Date: |
Tue, 22 Nov 2022 12:44:37 +0000 |
On Tue, 22 Nov 2022 at 08:58, Markus Armbruster <armbru@redhat.com> wrote:
> I don't think complete detailed review is necessary or even sensible.
>
> Review should start with the Coccinelle script:
>
> // replace 'R = X; return R;' with 'return X;'
> @@
> identifier VAR;
> expression E;
> type T;
> identifier F;
> @@
> T F(...)
> {
> ...
> - T VAR;
> ... when != VAR
>
> - VAR = (E);
> - return VAR;
> + return E;
> ... when != VAR
> }
>
> What could go wrong? Not a rhetorical question!
The obvious answer is "you might have got your manual tweaking
wrong". A purely mechanised patch I can review by looking at
the script and maybe eyeballing a few instances of the change;
a change that is 99% mechanised and 1% hand-written I need to
run through to find the hand-written parts.
But mostly this patch is hard to review for its sheer size,
mechanical changes or not. A 3000 line patchmail is so big that
the UI on my mail client gets pretty unwieldy.
-- PMM
- [PATCH] cleanup: Tweak and re-run return_directly.cocci, Markus Armbruster, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Peter Maydell, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Markus Armbruster, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Philippe Mathieu-Daudé, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Markus Armbruster, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Thomas Huth, 2022/11/21
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Markus Armbruster, 2022/11/22
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci,
Peter Maydell <=
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Markus Armbruster, 2022/11/22
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Peter Maydell, 2022/11/22
- Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Philippe Mathieu-Daudé, 2022/11/22
Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci, Max Filippov, 2022/11/21