[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [RFC v2 6/9] scripts: add coccinelle script to use auto propagated errp
- To: Eric Blake <eblake@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>
- From: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
- Date: Tue, 24 Sep 2019 10:35:56 +0000
- Accept-language: ru-RU, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JmvZlQ0ce7s+N8dBgVBHG3H0VsJezhsQxCEK1sAZW9U=; b=ESQWuWoLU+g8e2hu72PyqWus4WgnmBwVGR/MepEepVPn041b8msEUMiXI17LVkwfOSCvhvWj3Se6sIo1Rj9zWijHB9QF3spyDxSUkXpxePfvzral5q/S5754Vqq99NWcF/DUTW9rnaKWVaehkXliQZsDzZYAkK8RV6HjeR+aKjqaFElDlDit5NJzKtV26hmdvoKLE5JSARGdTRTsB51QM+59knICFWi0XfI0B7ZuhPasEqDRFTpxixZ8Fw9ZkkAlvEnsYVwKmvKv06IQ0Z58eNpJsfpkvdNpnUy0JIJducQtQwnp9mRrm318Hg270tOhx4+/d3fPSNDh23XKQQ2fTA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8BjiU/bFwBYJLgmXN0go770DziO46oyObhfNcKLcPU8WRmpkq7OInQDABbdCjgCwkGoJMLq562WsQc0bS75efH6Y+1FD1lI3mi7Ui3kcwMFzln1rq3bvyZNAoIa+WxkBBxSSpcgUL3DR3BZYnmb7P86OXcDHVBh78qOKqN7XL8KAwhO+4m1w+ZvIRR8RxHMdIgPJJHmc3l4VHbpBnWIHVK1Tguxe0WQrsPCcxCMUWJnyahBSr7RWKWthQS4kBmI+oiAETA3URlvOSqVuMmAaThvo1DcB8dZC5VbCMDXjVfzojwKFv+dNQsQT+d/AHnXiXrhmTZFq6d/Ktx+ni25SA==
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vsementsov@xxxxxxxxxxxxx;
- Cc: "stefanha@xxxxxxxxxx" <stefanha@xxxxxxxxxx>, "jan.kiszka@xxxxxxxxxxx" <jan.kiszka@xxxxxxxxxxx>, "zhang.zhanghailiang@xxxxxxxxxx" <zhang.zhanghailiang@xxxxxxxxxx>, "qemu-block@xxxxxxxxxx" <qemu-block@xxxxxxxxxx>, "arikalo@xxxxxxxxxxxx" <arikalo@xxxxxxxxxxxx>, "pasic@xxxxxxxxxxxxx" <pasic@xxxxxxxxxxxxx>, "hpoussin@xxxxxxxxxxx" <hpoussin@xxxxxxxxxxx>, "anthony.perard@xxxxxxxxxx" <anthony.perard@xxxxxxxxxx>, "samuel.thibault@xxxxxxxxxxxx" <samuel.thibault@xxxxxxxxxxxx>, "balrogg@xxxxxxxxx" <balrogg@xxxxxxxxx>, "jasowang@xxxxxxxxxx" <jasowang@xxxxxxxxxx>, "lvivier@xxxxxxxxxx" <lvivier@xxxxxxxxxx>, "ehabkost@xxxxxxxxxx" <ehabkost@xxxxxxxxxx>, "xiechanglong.d@xxxxxxxxx" <xiechanglong.d@xxxxxxxxx>, "pl@xxxxxxx" <pl@xxxxxxx>, "dgilbert@xxxxxxxxxx" <dgilbert@xxxxxxxxxx>, "b.galvani@xxxxxxxxx" <b.galvani@xxxxxxxxx>, "eric.auger@xxxxxxxxxx" <eric.auger@xxxxxxxxxx>, "alex.williamson@xxxxxxxxxx" <alex.williamson@xxxxxxxxxx>, "ronniesahlberg@xxxxxxxxx" <ronniesahlberg@xxxxxxxxx>, "rth@xxxxxxxxxxx" <rth@xxxxxxxxxxx>, "kwolf@xxxxxxxxxx" <kwolf@xxxxxxxxxx>, "andrew@xxxxxxxx" <andrew@xxxxxxxx>, "crwulff@xxxxxxxxx" <crwulff@xxxxxxxxx>, "sundeep.lkml@xxxxxxxxx" <sundeep.lkml@xxxxxxxxx>, "michael@xxxxxxxx" <michael@xxxxxxxx>, "qemu-ppc@xxxxxxxxxx" <qemu-ppc@xxxxxxxxxx>, "kbastian@xxxxxxxxxxxxxxxxxxxxx" <kbastian@xxxxxxxxxxxxxxxxxxxxx>, "imammedo@xxxxxxxxxx" <imammedo@xxxxxxxxxx>, "fam@xxxxxxxxxx" <fam@xxxxxxxxxx>, "peter.maydell@xxxxxxxxxx" <peter.maydell@xxxxxxxxxx>, "sheepdog@xxxxxxxxxxxxxx" <sheepdog@xxxxxxxxxxxxxx>, "david@xxxxxxxxxx" <david@xxxxxxxxxx>, "palmer@xxxxxxxxxx" <palmer@xxxxxxxxxx>, "jcmvbkbc@xxxxxxxxx" <jcmvbkbc@xxxxxxxxx>, "hare@xxxxxxxx" <hare@xxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "arei.gonglei@xxxxxxxxxx" <arei.gonglei@xxxxxxxxxx>, "marcel.apfelbaum@xxxxxxxxx" <marcel.apfelbaum@xxxxxxxxx>, "namei.unix@xxxxxxxxx" <namei.unix@xxxxxxxxx>, "atar4qemu@xxxxxxxxx" <atar4qemu@xxxxxxxxx>, "thuth@xxxxxxxxxx" <thuth@xxxxxxxxxx>, "amit@xxxxxxxxxx" <amit@xxxxxxxxxx>, "sw@xxxxxxxxxxx" <sw@xxxxxxxxxxx>, "groug@xxxxxxxx" <groug@xxxxxxxx>, "qemu-s390x@xxxxxxxxxx" <qemu-s390x@xxxxxxxxxx>, "qemu-arm@xxxxxxxxxx" <qemu-arm@xxxxxxxxxx>, "peter.chubb@xxxxxxxxxxxx" <peter.chubb@xxxxxxxxxxxx>, "clg@xxxxxxxx" <clg@xxxxxxxx>, "shorne@xxxxxxxxx" <shorne@xxxxxxxxx>, "qemu-riscv@xxxxxxxxxx" <qemu-riscv@xxxxxxxxxx>, "cohuck@xxxxxxxxxx" <cohuck@xxxxxxxxxx>, "philmd@xxxxxxxxxx" <philmd@xxxxxxxxxx>, "amarkovic@xxxxxxxxxxxx" <amarkovic@xxxxxxxxxxxx>, "aurelien@xxxxxxxxxxx" <aurelien@xxxxxxxxxxx>, "pburton@xxxxxxxxxxxx" <pburton@xxxxxxxxxxxx>, "sagark@xxxxxxxxxxxxxxxxx" <sagark@xxxxxxxxxxxxxxxxx>, "green@xxxxxxxxxxxxxx" <green@xxxxxxxxxxxxxx>, "kraxel@xxxxxxxxxx" <kraxel@xxxxxxxxxx>, "edgar.iglesias@xxxxxxxxx" <edgar.iglesias@xxxxxxxxx>, "gxt@xxxxxxxxxxxxxxx" <gxt@xxxxxxxxxxxxxxx>, "quintela@xxxxxxxxxx" <quintela@xxxxxxxxxx>, "mdroth@xxxxxxxxxxxxxxxxxx" <mdroth@xxxxxxxxxxxxxxxxxx>, "borntraeger@xxxxxxxxxx" <borntraeger@xxxxxxxxxx>, "antonynpavlov@xxxxxxxxx" <antonynpavlov@xxxxxxxxx>, "joel@xxxxxxxxx" <joel@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "integration@xxxxxxxxxxx" <integration@xxxxxxxxxxx>, "lersek@xxxxxxxxxx" <lersek@xxxxxxxxxx>, "Andrew.Baumann@xxxxxxxxxxxxx" <Andrew.Baumann@xxxxxxxxxxxxx>, "mreitz@xxxxxxxxxx" <mreitz@xxxxxxxxxx>, "walling@xxxxxxxxxxxxx" <walling@xxxxxxxxxxxxx>, Denis Lunev <den@xxxxxxxxxxxxx>, "mst@xxxxxxxxxx" <mst@xxxxxxxxxx>, "mark.cave-ayland@xxxxxxxxxxxx" <mark.cave-ayland@xxxxxxxxxxxx>, "v.maffione@xxxxxxxxx" <v.maffione@xxxxxxxxx>, "marex@xxxxxxx" <marex@xxxxxxx>, "armbru@xxxxxxxxxx" <armbru@xxxxxxxxxx>, "marcandre.lureau@xxxxxxxxxx" <marcandre.lureau@xxxxxxxxxx>, "alistair@xxxxxxxxxxxxx" <alistair@xxxxxxxxxxxxx>, "paul.durrant@xxxxxxxxxx" <paul.durrant@xxxxxxxxxx>, "pavel.dovgaluk@xxxxxxxxx" <pavel.dovgaluk@xxxxxxxxx>, "g.lettieri@xxxxxxxxxxxx" <g.lettieri@xxxxxxxxxxxx>, "rizzo@xxxxxxxxxxxx" <rizzo@xxxxxxxxxxxx>, "david@xxxxxxxxxxxxxxxxxxxxx" <david@xxxxxxxxxxxxxxxxxxxxx>, "akrowiak@xxxxxxxxxxxxx" <akrowiak@xxxxxxxxxxxxx>, "berrange@xxxxxxxxxx" <berrange@xxxxxxxxxx>, "xiaoguangrong.eric@xxxxxxxxx" <xiaoguangrong.eric@xxxxxxxxx>, "pmorel@xxxxxxxxxxxxx" <pmorel@xxxxxxxxxxxxx>, "wencongyang2@xxxxxxxxxx" <wencongyang2@xxxxxxxxxx>, "jcd@xxxxxxxxxxxxxxx" <jcd@xxxxxxxxxxxxxxx>, "pbonzini@xxxxxxxxxx" <pbonzini@xxxxxxxxxx>, "stefanb@xxxxxxxxxxxxx" <stefanb@xxxxxxxxxxxxx>
- Delivery-date: Tue, 24 Sep 2019 10:36:11 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHVcin6p36e+6YlfEqQb7RcIZ1Pjqc5sEKAgAAXhICAANuNgA==
- Thread-topic: [RFC v2 6/9] scripts: add coccinelle script to use auto propagated errp
24.09.2019 0:29, Eric Blake wrote:
> On 9/23/19 3:05 PM, Eric Blake wrote:
>
>> Does running this Coccinelle script 2 times in a row add a second
>> ERRP_FUNCTION_BEGIN() line? We want it to be idempotent (no changes on
>> a second run). (Admittedly, I did not actually test that yet). Also, I
>> don't know if this can be tweaked to avoid adding the line to a function
>> with an empty body, maybe:
>>
>> fn(..., Error **errp, ...)
>> {
>> + ERRP_FUNCTION_BEGIN();
>> ...
>> }
No, we need exactly this to match not only empty functions. But with ... it
matches
empty functions as well.
>
> Also untested:
>
> fn(..., Error **errp, ...)
> {
> (
> |
> ERRP_FUNCTION_BEGIN();
> ...
> |
> + ERRP_FUNCTION_BEGIN()
> ...
> )
> }
Seems, that doesn't work..
It says:
12: no available token to attach to
where 12 is line "+ ERRP_FUNCTION_BEGIN()"
So, I tend to just add chunk to remove duplicated invocation :)
>
>
>> Overall, the script makes sense in my reading (but no idea if it
>> actually catches everything we want, or if it missed something).
>
> Having spot-checked 7, it definitely misses cases where it was supposed
> to add ERRP_FUNCTION_BEGIN().
>
--
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|