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

Re: [Xen-devel] [PATCH v6 11/11] xen: introduce ERRP_AUTO_PROPAGATE


  • To: Paul Durrant <pdurrant@xxxxxxxxx>
  • From: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
  • Date: Mon, 13 Jan 2020 09:25:53 +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=S2lr5MkbpZ7xdcDBroSFNykyh0X00h4FNd25APfKBV4=; b=LJX/dmRKMHxa2PCTuoK7tBf+8WUaTZv96FhrofOYPGOebxM1iAbMbw0qgPfV04DygzB9KaYxdcQF02pkjgBdsWxe/buhOch/vFeggc+zU8DqFkKHzZ6uYBzWoN0Jz9Hg6j4ZPUq9Q5KILQUbozC2mo2xPaQ1m+WOhT2mXsvY7qKhcph7yK8gPgAG4nErqPgU1wKIuLTBaOqd3gwtmJbToKqd73pbGRI+5dgYy5Yd606bhxi+o/IF6ryJaCg03cJHNWlPyqSuTMssvoyBcU5zhlEWVGhtEMxJcYghqZxdNytdOBs5o4spySC2I8pquBZJTsC15l2xhC2iMs/1t6pWZg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KfjaXJWrFcQZ/rOoOiVALmAbQua2rXoMMoQFV4Bz08Le63PCe2EgMJdGd7SBls00Wabw0kTqonHddxQhz+xa+KEUL/eQcC+vkzlUauV1bZ4ahKo2A4iwRpJOkzhSU6QpKC5myFinE4DXvkuBuLXL0s/wy0ND/FgnY3WNORbBBwj/T5gpjJpnAKqJ/fjgFTSN2H+L3ei2mk+rWo5/hCuNz3T/JvvcrmPWHO0/WzLcP8ObaCzaRePycBAnnua5crKfgCnenUPTkY5qe0Rc6X/iARU9BiZ2kBla171zaV/PYTMjkrQ3IGUhpaxnycrkxK9bZuWKxobVtEjhimAOM+JUIQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vsementsov@xxxxxxxxxxxxx;
  • Cc: Kevin Wolf <kwolf@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "qemu-block@xxxxxxxxxx" <qemu-block@xxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, Greg Kurz <groug@xxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Max Reitz <mreitz@xxxxxxxxxx>
  • Delivery-date: Mon, 13 Jan 2020 09:26:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVx+4SemIU9UZ3f0OF7z9Sc9J7KafoTvyAgAAIDIA=
  • Thread-topic: [PATCH v6 11/11] xen: introduce ERRP_AUTO_PROPAGATE

13.01.2020 11:57, Paul Durrant wrote:
> On Fri, 10 Jan 2020 at 19:42, Vladimir Sementsov-Ogievskiy
> <vsementsov@xxxxxxxxxxxxx> wrote:
>>
>> If we want to add some info to errp (by error_prepend() or
>> error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
>> Otherwise, this info will not be added when errp == &error_fatal
>> (the program will exit prior to the error_append_hint() or
>> error_prepend() call).  Fix such cases.
>>
>> If we want to check error after errp-function call, we need to
>> introduce local_err and then propagate it to errp. Instead, use
>> ERRP_AUTO_PROPAGATE macro, benefits are:
>> 1. No need of explicit error_propagate call
>> 2. No need of explicit local_err variable: use errp directly
>> 3. ERRP_AUTO_PROPAGATE leaves errp as is if it's not NULL or
>>     &error_fatal, this means that we don't break error_abort
>>     (we'll abort on error_set, not on error_propagate)
>>
>> This commit is generated by command
>>
>>      sed -n '/^X86 Xen CPUs$/,/^$/{s/^F: //p}' MAINTAINERS | \
>>      xargs git ls-files | grep '\.[hc]$' | \
>>      xargs spatch \
>>          --sp-file scripts/coccinelle/auto-propagated-errp.cocci \
>>          --macro-file scripts/cocci-macro-file.h \
>>          --in-place --no-show-diff --max-width 80
>>
>> Reported-by: Kevin Wolf <kwolf@xxxxxxxxxx>
>> Reported-by: Greg Kurz <groug@xxxxxxxx>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxx>
> 
> Acked-by: Paul Durrant <paul@xxxxxxx>
> 

Thanks!

-- 
Best regards,
Vladimir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.