[GEDI] [RFC v2 7/9] Use auto-propagated errp

Vladimir Sementsov-Ogievskiy vsementsov at virtuozzo.com
Tue Sep 24 07:54:29 UTC 2019


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 <vsementsov at virtuozzo.com>
>> ---
> 
> 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


More information about the integration mailing list