[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v2 7/9] Use auto-propagated errp
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [RFC v2 7/9] Use auto-propagated errp |
Date: |
Tue, 24 Sep 2019 07:54:29 +0000 |
23.09.2019 23:30, Eric Blake wrote:
> On 9/23/19 11:12 AM, Vladimir Sementsov-Ogievskiy wrote:
>> This commit is generated by command
>>
>> git grep -l 'Error \*\*errp' | while read f; \
>> do spatch --sp-file \
>> scripts/coccinelle/auto-propagated-errp.cocci --in-place $f; done
>>
>
> As mentioned in your cover letter, this fails syntax-check and
> compilation without squashing in some followups; if we can't improve the
> .cocci script to do it automatically, then manually squashing in
> cleanups (and documenting what types of cleanups they were) is fine.
> (The goal for a mechanical patch like this is to make it easy enough to
> automate downstream, even where the file contents are changed, but where
> the process for creating those changes are the same).
>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
>> ---
>
> Spot-checking
>
>> block/io.c | 11 +-
>
>> block/nbd.c | 44 +++---
>
>> qapi/qapi-visit-core.c | 53 ++-----
>
> just to see how it looks.
>
>> +++ b/block/io.c
>> @@ -136,7 +136,6 @@ static void bdrv_merge_limits(BlockLimits *dst, const
>> BlockLimits *src)
>> void bdrv_refresh_limits(BlockDriverState *bs, Error **errp)
>> {
>> BlockDriver *drv = bs->drv;
>> - Error *local_err = NULL;
>>
>
> Umm, no insertion of ERR_FUNCTION_BEGIN(). Oops.
Oops. Seems I injected it _only_ to empty functions. It's because I missed
'...' in first hunk.
--
Best regards,
Vladimir
- [RFC v2 0/9] error: auto propagated local_err, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 5/9] net/net: fix local variable shadowing in net_client_init, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 7/9] Use auto-propagated errp, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 2/9] qapi/error: add (Error **errp) cleaning APIs, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 1/9] error: auto propagated local_err, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 3/9] errp: rename errp to errp_in where it is IN-argument, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 9/9] fix-compilation: includes, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 8/9] fix-compilation: empty goto, Vladimir Sementsov-Ogievskiy, 2019/09/23
- [RFC v2 6/9] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2019/09/23