From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945597; cv=none; d=zoho.com; s=zohoarc; b=NDmCBFBrWvem1lGpbr8n1W/a1GU7p/anTM5N8Xe02IJcYe/S+OzUITTTYFbAOE2smCMp+i2LElGNgGavWyZGkeo5CFb4ZDDH09BMJQgMrH1isbRI3k0E85oGQyj5D0D4aZqkT2Uf4UCp4boC6I+r/2xZjf87IslfREljURdtWSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945597; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TbzIfhuHVj1flK/GOr92OkwzQvf93cKA+snFvBxMbMQ=; b=eMIQNyVpFQgVt9a9GkMdqbwLiYtRg1sNdSINu5B9Lv7SoZ1ZD98Eh3FGb73phOB9qg4OkA0UHCL17g8KQxnpfgDRJHQsu81EAND9edYgrQDCiYl95ina+M0UAZFZWfeTDwCjXROejupl5HKel/viTw2Vwv9vqziS6u3VVF57yLY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945597233927.5032533385873; Tue, 1 Oct 2019 08:59:57 -0700 (PDT) Received: from localhost ([::1]:44004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKZ9-0006KN-Hi for importer@patchew.org; Tue, 01 Oct 2019 11:59:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49873) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT0-00080S-7m for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKSy-0006Vv-Te for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:34 -0400 Received: from relay.sw.ru ([185.231.240.75]:38356) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKSy-0006UX-KV for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:32 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSw-0004xb-7y; Tue, 01 Oct 2019 18:53:30 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 01/31] errp: rename errp to errp_in where it is IN-argument Date: Tue, 1 Oct 2019 18:52:49 +0300 Message-Id: <20191001155319.8066-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Michael Roth , Markus Armbruster , "Dr. David Alan Gilbert" , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Error **errp is almost always OUT-argument: it's assumed to be NULL, or pointer to NULL-initialized pointer, or pointer to error_abort or error_fatal, for callee to report error. But very few functions instead get Error **errp as IN-argument: it's assumed to be set, and callee should clean it. In such cases, rename errp to errp_in. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- include/monitor/hmp.h | 2 +- include/qapi/error.h | 2 +- ui/vnc.h | 2 +- monitor/hmp-cmds.c | 8 ++++---- ui/vnc.c | 10 +++++----- util/error.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index a0e9511440..f929814f1a 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -16,7 +16,7 @@ =20 #include "qemu/readline.h" =20 -void hmp_handle_error(Monitor *mon, Error **errp); +void hmp_handle_error(Monitor *mon, Error **errp_in); =20 void hmp_info_name(Monitor *mon, const QDict *qdict); void hmp_info_version(Monitor *mon, const QDict *qdict); diff --git a/include/qapi/error.h b/include/qapi/error.h index 3f95141a01..9376f59c35 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -283,7 +283,7 @@ void error_free(Error *err); /* * Convenience function to assert that *@errp is set, then silently free i= t. */ -void error_free_or_abort(Error **errp); +void error_free_or_abort(Error **errp_in); =20 /* * Convenience function to warn_report() and free @err. diff --git a/ui/vnc.h b/ui/vnc.h index fea79c2fc9..00e0b48f2f 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -547,7 +547,7 @@ uint32_t read_u32(uint8_t *data, size_t offset); =20 /* Protocol stage functions */ void vnc_client_error(VncState *vs); -size_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp); +size_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp_in); =20 void start_client_init(VncState *vs); void start_auth_vnc(VncState *vs); diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index b2551c16d1..941d5d0a45 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -60,11 +60,11 @@ #include #endif =20 -void hmp_handle_error(Monitor *mon, Error **errp) +void hmp_handle_error(Monitor *mon, Error **errp_in) { - assert(errp); - if (*errp) { - error_reportf_err(*errp, "Error: "); + assert(errp_in); + if (*errp_in) { + error_reportf_err(*errp_in, "Error: "); } } =20 diff --git a/ui/vnc.c b/ui/vnc.c index 87b8045afe..9d6384d9b1 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -1312,7 +1312,7 @@ void vnc_disconnect_finish(VncState *vs) g_free(vs); } =20 -size_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp) +size_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp_in) { if (ret <=3D 0) { if (ret =3D=3D 0) { @@ -1320,14 +1320,14 @@ size_t vnc_client_io_error(VncState *vs, ssize_t re= t, Error **errp) vnc_disconnect_start(vs); } else if (ret !=3D QIO_CHANNEL_ERR_BLOCK) { trace_vnc_client_io_error(vs, vs->ioc, - errp ? error_get_pretty(*errp) : + errp_in ? error_get_pretty(*errp_in)= : "Unknown"); vnc_disconnect_start(vs); } =20 - if (errp) { - error_free(*errp); - *errp =3D NULL; + if (errp_in) { + error_free(*errp_in); + *errp_in =3D NULL; } return 0; } diff --git a/util/error.c b/util/error.c index d4532ce318..b3ff3832d6 100644 --- a/util/error.c +++ b/util/error.c @@ -271,11 +271,11 @@ void error_free(Error *err) } } =20 -void error_free_or_abort(Error **errp) +void error_free_or_abort(Error **errp_in) { - assert(errp && *errp); - error_free(*errp); - *errp =3D NULL; + assert(errp_in && *errp_in); + error_free(*errp_in); + *errp_in =3D NULL; } =20 void error_propagate(Error **dst_errp, Error *local_err) --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945393; cv=none; d=zoho.com; s=zohoarc; b=j7DvTNrAZYyh1W/UZcE4sX1n4CxRkFtzSO43+vL2VOFooyFKLkeiC9QcofAIIT/LqmVLhbtj05cxapSg5i04KNKR2f2GJoXT3AKRuUwZEiFsOm2DTdyo6pBqvVvds6O3cMDkycG8UuMG2Bjg+lmLC1bhb0b72jnKMtADkyZxxkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945393; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=eIuFqdVYmXmR5lHaAsNLWO0qBwFTTVdgMY/IbDadQqo=; b=C02VXK16a6Xtghx/bzTtB5xJnlUJtn3gXRWfpK9c/HVfpOpZ+1H+5psmvcykRaJSbXlPLA2elqFphAXoquN5obQEBDuv5DCAxpn/JRoCpT7+UzbBkAthYCNehh8LCjJMWYiXqgbzCukzmo2Z5k0qjVKtCbDLBHIJCGWm/Myqfpw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156994539312144.13876864196004; Tue, 1 Oct 2019 08:56:33 -0700 (PDT) Received: from localhost ([::1]:43956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKVr-0002aL-9H for importer@patchew.org; Tue, 01 Oct 2019 11:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49871) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT0-000800-8A for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKSy-0006W1-UG for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:33 -0400 Received: from relay.sw.ru ([185.231.240.75]:38350) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKSy-0006UE-LH for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:32 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSw-0004xb-DX; Tue, 01 Oct 2019 18:53:30 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 02/31] hw/core/loader-fit: fix freeing errp in fit_load_fdt Date: Tue, 1 Oct 2019 18:52:50 +0300 Message-Id: <20191001155319.8066-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Paul Burton , Vladimir Sementsov-Ogievskiy Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" fit_load_fdt forget to check that errp is not NULL and to zero it after freeing. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- hw/core/loader-fit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 953b16bc82..3ee9fb2f2e 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -200,7 +200,10 @@ static int fit_load_fdt(const struct fit_loader *ldr, = const void *itb, err =3D fit_image_addr(itb, img_off, "load", &load_addr, errp); if (err =3D=3D -ENOENT) { load_addr =3D ROUND_UP(kernel_end, 64 * KiB) + (10 * MiB); - error_free(*errp); + if (errp) { + error_free(*errp); + *errp =3D NULL; + } } else if (err) { error_prepend(errp, "unable to read FDT load address from FIT: "); ret =3D err; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945853; cv=none; d=zoho.com; s=zohoarc; b=K/u83bmCfbEW05oXLMgzAkmSSh8Ghj+y7MfOxry08DNUs2c8zJCsFlGcRUdlZ96XeEGKnZ8shN1aROr6PJW0Fc4Bhefw06l2mW3XSmuJI8Bu0ZE2tQDDXWd3g/7meXsD4LUadw+2GH6SVEk8D+COmKgc1cHyWW+gJ3zOosjDTeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945853; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=VmCIuS7k/Rh5E8UdFCYHsO7CVzLAITfu7YwknSXmtx0=; b=mpamD5VYKppIuYfanVKnr1eM7W/8vOeMRLrcY1nmq2Qw4EVK3zkGTuLOXr7tqx4sHKKj6scvzaCSfev3wQWFRRKfYwVhR4ULsHk7YmHVG01n5oleg7oA2nstevHOSn6FQWxMVDpMh+6EqjAqpiQXIXlBAKeUJzqcQFxQEbZ61lU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945853691252.79966224080943; Tue, 1 Oct 2019 09:04:13 -0700 (PDT) Received: from localhost ([::1]:44068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKdH-0002CN-VC for importer@patchew.org; Tue, 01 Oct 2019 12:04:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49872) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT0-000804-7e for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKSy-0006WA-Vh for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:33 -0400 Received: from relay.sw.ru ([185.231.240.75]:38352) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKSy-0006UF-NZ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:32 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSw-0004xb-IV; Tue, 01 Oct 2019 18:53:30 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 03/31] net/net: fix local variable shadowing in net_client_init Date: Tue, 1 Oct 2019 18:52:51 +0300 Message-Id: <20191001155319.8066-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang , Vladimir Sementsov-Ogievskiy Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Don't shadow Error *err: it's a bad thing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- net/net.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/net/net.c b/net/net.c index 84aa6d8d00..9e93c3f8a1 100644 --- a/net/net.c +++ b/net/net.c @@ -1126,16 +1126,13 @@ static int net_client_init(QemuOpts *opts, bool is_= netdev, Error **errp) =20 prefix_addr =3D substrings[0]; =20 - if (substrings[1]) { - /* User-specified prefix length. */ - int err; - - err =3D qemu_strtoul(substrings[1], NULL, 10, &prefix_len); - if (err) { - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, - "ipv6-prefixlen", "a number"); - goto out; - } + /* Handle user-specified prefix length. */ + if (substrings[1] && + qemu_strtoul(substrings[1], NULL, 10, &prefix_len)) + { + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, + "ipv6-prefixlen", "a number"); + goto out; } =20 qemu_opt_set(opts, "ipv6-prefix", prefix_addr, &error_abort); --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947087; cv=none; d=zoho.com; s=zohoarc; b=QUAqra65EDhu73SlOvqwCXZDssIhc+itj3Qy0DFuu3umJAmgzfuXT9p9QOrhP6Vap/ta6wnl1eUK2viFZrwa1TNPa7hUoKj60SmM/l3UvGneQ4gFyXhmE6Dp63Psh5K+RhcI3BOSfRLZscoLF5P/Pe5YtqjA9I7kMJIbmQWf+js= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947087; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=iOR1wPucok67SIc9AtGi38LPajjE+rCnTpIVcEkmZro=; b=Z8h0g0xLgnQQ3UhX6Dnp/PAI3tVFismTbXEU+rFDN0P0CykAiF42R0QTk0iuJqXCfiqg5rfdoqJab2LJjDfivMydJWJn276iq6y5mZTcgEqKikhA23Mlv4kAQxFhY0OMY7+PMz/QbTr7c+cV7YoXEBUvha9Ff7D200OIWXltjw0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947087811751.8656997598392; Tue, 1 Oct 2019 09:24:47 -0700 (PDT) Received: from localhost ([::1]:44386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKxB-0005eI-TN for importer@patchew.org; Tue, 01 Oct 2019 12:24:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50410) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKU0-0000jN-C5 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTy-0007Ec-5G for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38470) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTr-0006Zo-8W; Tue, 01 Oct 2019 11:54:33 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSw-0004xb-Of; Tue, 01 Oct 2019 18:53:30 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 04/31] error: auto propagated local_err Date: Tue, 1 Oct 2019 18:52:52 +0300 Message-Id: <20191001155319.8066-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, pburton@wavecomp.com, peter.maydell@linaro.org, codyprime@gmail.com, jasowang@redhat.com, mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com, kraxel@redhat.com, sundeep.lkml@gmail.com, qemu-block@nongnu.org, quintela@redhat.com, arikalo@wavecomp.com, mst@redhat.com, armbru@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, joel@jms.id.au, marcandre.lureau@redhat.com, rth@twiddle.net, farman@linux.ibm.com, ehabkost@redhat.com, sw@weilnetz.de, groug@kaod.org, yuval.shaia@oracle.com, dgilbert@redhat.com, alex.williamson@redhat.com, integration@gluster.org, clg@kaod.org, stefanha@redhat.com, david@redhat.com, jsnow@redhat.com, david@gibson.dropbear.id.au, kwolf@redhat.com, Vladimir Sementsov-Ogievskiy , berrange@redhat.com, andrew@aj.id.au, cohuck@redhat.com, qemu-s390x@nongnu.org, mreitz@redhat.com, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of functions with errp OUT parameter. It has three goals: 1. Fix issue with error_fatal & error_prepend/error_append_hint: user can't see this additional information, because exit() happens in error_setg earlier than information is added. [Reported by Greg Kurz] 2. Fix issue with error_abort & error_propagate: when we wrap error_abort by local_err+error_propagate, resulting coredump will refer to error_propagate and not to the place where error happened. (the macro itself doesn't fix the issue, but it allows to [3.] drop all local_err+error_propagate pattern, which will definitely fix the issue) [Reported by Kevin Wolf] 3. Drop local_err+error_propagate pattern, which is used to workaround void functions with errp parameter, when caller wants to know resulting status. (Note: actually these functions could be merely updated to return int error code). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- CC: kwolf@redhat.com CC: mreitz@redhat.com CC: jsnow@redhat.com CC: fam@euphon.net CC: sw@weilnetz.de CC: codyprime@gmail.com CC: marcandre.lureau@redhat.com CC: pbonzini@redhat.com CC: groug@kaod.org CC: sundeep.lkml@gmail.com CC: peter.maydell@linaro.org CC: stefanha@redhat.com CC: pburton@wavecomp.com CC: arikalo@wavecomp.com CC: berrange@redhat.com CC: ehabkost@redhat.com CC: david@gibson.dropbear.id.au CC: clg@kaod.org CC: mst@redhat.com CC: marcel.apfelbaum@gmail.com CC: mark.cave-ayland@ilande.co.uk CC: yuval.shaia@oracle.com CC: cohuck@redhat.com CC: farman@linux.ibm.com CC: rth@twiddle.net CC: david@redhat.com CC: pasic@linux.ibm.com CC: borntraeger@de.ibm.com CC: kraxel@redhat.com CC: alex.williamson@redhat.com CC: andrew@aj.id.au CC: joel@jms.id.au CC: eblake@redhat.com CC: armbru@redhat.com CC: mdroth@linux.vnet.ibm.com CC: quintela@redhat.com CC: dgilbert@redhat.com CC: jasowang@redhat.com CC: qemu-block@nongnu.org CC: integration@gluster.org CC: qemu-arm@nongnu.org CC: qemu-ppc@nongnu.org CC: qemu-s390x@nongnu.org include/qapi/error.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/include/qapi/error.h b/include/qapi/error.h index 9376f59c35..02f967ac1d 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -322,6 +322,43 @@ void error_set_internal(Error **errp, ErrorClass err_class, const char *fmt, ...) GCC_FMT_ATTR(6, 7); =20 +typedef struct ErrorPropagator { + Error *local_err; + Error **errp; +} ErrorPropagator; + +static inline void error_propagator_cleanup(ErrorPropagator *prop) +{ + error_propagate(prop->errp, prop->local_err); +} + +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(ErrorPropagator, error_propagator_cleanup= ); + +/* + * ERRP_AUTO_PROPAGATE + * + * This macro is created to be the first line of a function with Error **e= rrp + * OUT parameter. It's needed only in cases where we want to use error_pre= pend, + * error_append_hint or dereference *errp. It's still safe (but useless) in + * other cases. + * + * If errp is NULL or points to error_fatal, it is rewritten to point to a + * local Error object, which will be automatically propagated to the origi= nal + * errp on function exit (see error_propagator_cleanup). + * + * After invocation of this macro it is always safe to dereference errp + * (as it's not NULL anymore) and to append hints (by error_append_hint) + * (as, if it was error_fatal, we swapped it with a local_error to be + * propagated on cleanup). + * + * Note: we don't wrap the error_abort case, as we want resulting coredump + * to point to the place where the error happened, not to error_propagate. + */ +#define ERRP_AUTO_PROPAGATE() \ +g_auto(ErrorPropagator) __auto_errp_prop =3D {.errp =3D errp}; \ +errp =3D ((errp =3D=3D NULL || *errp =3D=3D error_fatal) ? \ + &__auto_errp_prop.local_err : errp) + /* * Special error destination to abort on error. * See error_setg() and error_propagate() for details. --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947263; cv=none; d=zoho.com; s=zohoarc; b=lJWV5ykcYpCotnYNbLJKhgZW8gUcwu2gEgbfmIAoDDGRFADeIA07066ExKm+QtHKJ/14uEJYzVR3fmvYNVKMslemOEHf0egza9KC/3j8TgMkuJQ5VoE2DMQ0NUBngdODAlvpG3FxrOdbmBchWWFZTJ01oEhFpR+qkqBbMk1MH24= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947263; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=jOyb3IK719+cYMyWXWOTuF2gbWutzQKRRMSIREqPiVU=; b=DXqAYSCi0huH8Na2Z+/D+ZoMgMJY5YfH3OK+kpQFg3/Vglb+WZfK4LJpF4AUlAlLO9OOp4XFLcpWiGEAXVi8zBJBC5gWmzm1VbVw4GHQoH2fM7sVTxPpoBlZX73dwn/RqfpAV0x85tWAMQ16Af2+Wx/KG8C3OaMhQPAPAMV1/uA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947263954518.5100698463368; Tue, 1 Oct 2019 09:27:43 -0700 (PDT) Received: from localhost ([::1]:44420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFL01-0000cR-P6 for importer@patchew.org; Tue, 01 Oct 2019 12:27:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50408) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKU0-0000jH-Bn for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTy-0007Em-8C for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38472) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTr-0006Zn-UH; Tue, 01 Oct 2019 11:54:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSw-0004xb-W4; Tue, 01 Oct 2019 18:53:31 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 05/31] scripts: add script to fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:53 +0300 Message-Id: <20191001155319.8066-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, pburton@wavecomp.com, peter.maydell@linaro.org, codyprime@gmail.com, jasowang@redhat.com, mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com, kraxel@redhat.com, sundeep.lkml@gmail.com, qemu-block@nongnu.org, quintela@redhat.com, arikalo@wavecomp.com, mst@redhat.com, armbru@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, joel@jms.id.au, marcandre.lureau@redhat.com, rth@twiddle.net, farman@linux.ibm.com, ehabkost@redhat.com, sw@weilnetz.de, groug@kaod.org, yuval.shaia@oracle.com, dgilbert@redhat.com, alex.williamson@redhat.com, integration@gluster.org, clg@kaod.org, stefanha@redhat.com, david@redhat.com, jsnow@redhat.com, david@gibson.dropbear.id.au, kwolf@redhat.com, Vladimir Sementsov-Ogievskiy , berrange@redhat.com, andrew@aj.id.au, cohuck@redhat.com, qemu-s390x@nongnu.org, mreitz@redhat.com, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" error_append_hint and error_prepend will not work, if errp =3D=3D &fatal_error, as program will exit before error_append_hint or error_prepend call. Fix this by use of special macro ERRP_AUTO_PROPAGATE. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- CC: kwolf@redhat.com CC: mreitz@redhat.com CC: jsnow@redhat.com CC: fam@euphon.net CC: sw@weilnetz.de CC: codyprime@gmail.com CC: marcandre.lureau@redhat.com CC: pbonzini@redhat.com CC: groug@kaod.org CC: sundeep.lkml@gmail.com CC: peter.maydell@linaro.org CC: stefanha@redhat.com CC: pburton@wavecomp.com CC: arikalo@wavecomp.com CC: berrange@redhat.com CC: ehabkost@redhat.com CC: david@gibson.dropbear.id.au CC: clg@kaod.org CC: mst@redhat.com CC: marcel.apfelbaum@gmail.com CC: mark.cave-ayland@ilande.co.uk CC: yuval.shaia@oracle.com CC: cohuck@redhat.com CC: farman@linux.ibm.com CC: rth@twiddle.net CC: david@redhat.com CC: pasic@linux.ibm.com CC: borntraeger@de.ibm.com CC: kraxel@redhat.com CC: alex.williamson@redhat.com CC: andrew@aj.id.au CC: joel@jms.id.au CC: eblake@redhat.com CC: armbru@redhat.com CC: mdroth@linux.vnet.ibm.com CC: quintela@redhat.com CC: dgilbert@redhat.com CC: jasowang@redhat.com CC: qemu-block@nongnu.org CC: integration@gluster.org CC: qemu-arm@nongnu.org CC: qemu-ppc@nongnu.org CC: qemu-s390x@nongnu.org scripts/coccinelle/fix-error-add-info.cocci | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scripts/coccinelle/fix-error-add-info.cocci diff --git a/scripts/coccinelle/fix-error-add-info.cocci b/scripts/coccinel= le/fix-error-add-info.cocci new file mode 100644 index 0000000000..34fa3be720 --- /dev/null +++ b/scripts/coccinelle/fix-error-add-info.cocci @@ -0,0 +1,28 @@ +@rule0@ +// Add invocation to errp-functions +identifier fn; +@@ + + fn(..., Error **errp, ...) + { ++ ERRP_AUTO_PROPAGATE(); + <+... +( + error_append_hint(errp, ...); +| + error_prepend(errp, ...); +) + ...+> + } + +@@ +// Drop doubled invocation +identifier rule0.fn; +@@ + + fn(...) +{ + ERRP_AUTO_PROPAGATE(); +- ERRP_AUTO_PROPAGATE(); + ... +} --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946880; cv=none; d=zoho.com; s=zohoarc; b=RGmNQw9yy183xxAFDe+mhenf2x8a3P4ANrBZOo+cpH1WH6nSST0MIFsgFwxh3J2w4lozLzl2E+AaLpEemmgFx8dsjZAGrw0uGaRHB3aO8BvPa1/34OPJa2s3SliyITrGTxOSq3Q2hX/UKDRex7wh05gRVmhnsU9spN0ckjVArKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946880; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1rELVPty46iwBPISyTbvW979a9IXXR0O7l3s977xb48=; b=RH4aiutkppyq890u/u7aaTh6y0fjx6OW5FgmbgkAa6R04g7wymZd0kd7+8YiBueAD3vY+Skuctrb4H6yncwlTwSkAMhe6Q5KIoMjE0fCOQHJ7Ahrakd4/mUKoHti0jfIdC3MaG5Va34aAV6IGuov9wzCcd9Jx6LxG3zTXaYnzq8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946880218125.05293654771981; Tue, 1 Oct 2019 09:21:20 -0700 (PDT) Received: from localhost ([::1]:44316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKtq-0001zE-DL for importer@patchew.org; Tue, 01 Oct 2019 12:21:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50409) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKU0-0000jI-B8 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTy-0007Eu-97 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38482) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTr-0006Zq-SI; Tue, 01 Oct 2019 11:54:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSx-0004xb-Aj; Tue, 01 Oct 2019 18:53:31 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 06/31] python: add commit-per-subsystem.py Date: Tue, 1 Oct 2019 18:52:54 +0300 Message-Id: <20191001155319.8066-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, pburton@wavecomp.com, peter.maydell@linaro.org, codyprime@gmail.com, jasowang@redhat.com, mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com, kraxel@redhat.com, sundeep.lkml@gmail.com, qemu-block@nongnu.org, quintela@redhat.com, arikalo@wavecomp.com, mst@redhat.com, armbru@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, joel@jms.id.au, marcandre.lureau@redhat.com, rth@twiddle.net, farman@linux.ibm.com, ehabkost@redhat.com, sw@weilnetz.de, groug@kaod.org, yuval.shaia@oracle.com, dgilbert@redhat.com, alex.williamson@redhat.com, integration@gluster.org, clg@kaod.org, stefanha@redhat.com, david@redhat.com, jsnow@redhat.com, david@gibson.dropbear.id.au, kwolf@redhat.com, Vladimir Sementsov-Ogievskiy , berrange@redhat.com, andrew@aj.id.au, cohuck@redhat.com, qemu-s390x@nongnu.org, mreitz@redhat.com, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add script to automatically commit tree-wide changes per-subsystem. Signed-off-by: Vladimir Sementsov-Ogievskiy --- CC: kwolf@redhat.com CC: mreitz@redhat.com CC: jsnow@redhat.com CC: fam@euphon.net CC: sw@weilnetz.de CC: codyprime@gmail.com CC: marcandre.lureau@redhat.com CC: pbonzini@redhat.com CC: groug@kaod.org CC: sundeep.lkml@gmail.com CC: peter.maydell@linaro.org CC: stefanha@redhat.com CC: pburton@wavecomp.com CC: arikalo@wavecomp.com CC: berrange@redhat.com CC: ehabkost@redhat.com CC: david@gibson.dropbear.id.au CC: clg@kaod.org CC: mst@redhat.com CC: marcel.apfelbaum@gmail.com CC: mark.cave-ayland@ilande.co.uk CC: yuval.shaia@oracle.com CC: cohuck@redhat.com CC: farman@linux.ibm.com CC: rth@twiddle.net CC: david@redhat.com CC: pasic@linux.ibm.com CC: borntraeger@de.ibm.com CC: kraxel@redhat.com CC: alex.williamson@redhat.com CC: andrew@aj.id.au CC: joel@jms.id.au CC: eblake@redhat.com CC: armbru@redhat.com CC: mdroth@linux.vnet.ibm.com CC: quintela@redhat.com CC: dgilbert@redhat.com CC: jasowang@redhat.com CC: qemu-block@nongnu.org CC: integration@gluster.org CC: qemu-arm@nongnu.org CC: qemu-ppc@nongnu.org CC: qemu-s390x@nongnu.org python/commit-per-subsystem.py | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 python/commit-per-subsystem.py diff --git a/python/commit-per-subsystem.py b/python/commit-per-subsystem.py new file mode 100755 index 0000000000..d8442d9ea3 --- /dev/null +++ b/python/commit-per-subsystem.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python3 +# +# Copyright (c) 2019 Virtuozzo International GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import subprocess +import sys + + +def git_add(pattern): + subprocess.run(['git', 'add', pattern]) + + +def git_commit(msg): + subprocess.run(['git', 'commit', '-m', msg], capture_output=3DTrue) + + +maintainers =3D sys.argv[1] +message =3D sys.argv[2].strip() + +subsystem =3D None + +shortnames =3D { + 'Block layer core': 'block', + 'ARM cores': 'arm', + 'Network Block Device (NBD)': 'nbd', + 'Command line option argument parsing': 'cmdline', + 'Character device backends': 'chardev', + 'S390 general architecture support': 's390' +} + + +def commit(): + if subsystem: + msg =3D subsystem + if msg in shortnames: + msg =3D shortnames[msg] + msg +=3D ': ' + message + git_commit(msg) + + +with open(maintainers) as f: + for line in f: + line =3D line.rstrip() + if not line: + continue + if len(line) >=3D 2 and line[1] =3D=3D ':': + if line[0] =3D=3D 'F' and line[3:] not in ['*', '*/']: + git_add(line[3:]) + else: + # new subsystem start + commit() + + subsystem =3D line + +commit() --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946508; cv=none; d=zoho.com; s=zohoarc; b=E7yrguQSaU2jco2F124vlKf8Ieh9h9qRYLSO9XV3gyhfBL9dbkA6TneFOXmMUnsE6RRtl4HymsIwhAh1MAK9/KloE4Toamq2Co9fsG+acasQwPSA93Txi4/youfBpjEJK6yjMlL5CNdKPB/BIFWZCQL0yKwudHSFiJB4j/eY1Gs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946508; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=9OgSBebH+0jJWJQpNRSraQNMTwjj2iU+yexpTySW36A=; b=NuoTnm61woTtIiP2eqAWUPue5J8fjDj/lu2/mOclW2xd4jvWCWmMkQ+FSpNWpBniaCYduFx9CNStuMqJaNXPjNapLWsIOygv5cfnvpPCvbKKtGbxLL1sUatBv+3dmYB+3WqxUuJbw6gqryflHG1HEUuFU8Vo8tDIbWh+GFUuTn8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946508708786.3399503734803; Tue, 1 Oct 2019 09:15:08 -0700 (PDT) Received: from localhost ([::1]:44240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKnp-0005z6-T5 for importer@patchew.org; Tue, 01 Oct 2019 12:15:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50270) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTP-0008Vi-FR for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTO-0006to-5g for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:59 -0400 Received: from relay.sw.ru ([185.231.240.75]:38426) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTN-0006YK-UO; Tue, 01 Oct 2019 11:53:58 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSx-0004xb-La; Tue, 01 Oct 2019 18:53:31 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 07/31] s390: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:55 +0300 Message-Id: <20191001155319.8066-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Farman , Vladimir Sementsov-Ogievskiy , David Hildenbrand , Cornelia Huck , Greg Kurz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Cornelia Huck --- hw/s390x/s390-ccw.c | 1 + target/s390x/cpu_models.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index 0c5a5b60bd..c0a648a7e0 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -55,6 +55,7 @@ static void s390_ccw_get_dev_info(S390CCWDevice *cdev, char *sysfsdev, Error **errp) { + ERRP_AUTO_PROPAGATE(); unsigned int cssid, ssid, devid; char dev_path[PATH_MAX] =3D {0}, *tmp; =20 diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 009afc38b9..32f2e5e822 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -840,6 +840,7 @@ static void error_prepend_missing_feat(const char *name= , void *opaque) static void check_compatibility(const S390CPUModel *max_model, const S390CPUModel *model, Error **errp) { + ERRP_AUTO_PROPAGATE(); S390FeatBitmap missing; =20 if (model->def->gen > max_model->def->gen) { @@ -922,6 +923,7 @@ static inline void apply_cpu_model(const S390CPUModel *= model, Error **errp) =20 void s390_realize_cpu_model(CPUState *cs, Error **errp) { + ERRP_AUTO_PROPAGATE(); S390CPUClass *xcc =3D S390_CPU_GET_CLASS(cs); S390CPU *cpu =3D S390_CPU(cs); const S390CPUModel *max_model; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945851; cv=none; d=zoho.com; s=zohoarc; b=Xv7Hz4M9tWYgvYXYq/vrRYjMxBI/sCYR3HXv8QcAgTTZwtXmbAsc2I4NRcCAtY08OGfVFoKHn2yxUM2EpjyC924KaItoxsPA9o/YEHlZMJAz8dKxLbZ8DXOl5lq19XSSf8OTrB3LR2/N0xa+rGrkTlDK+jjrYnsqiGecq/4VWG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945851; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=MM/4Le1ElSFvXB5k6S3LfZVUKx2mUpsF+PsU6qPs8a4=; b=O0pnxCCEUQJOMUrOJSeCxQzLL1Qp+lZC5TOsCjwDLydAYK5Y2TikPphMUfrYtYE3ev3TjdeXVTu1qhW149aGrgDQEyub661IzZCmI6e8018dYHjtKw41rT5/HZ62bAjqrlbG7XwNvC0zgEfVXBdfOOJTYakbbf0xSXlzm/GamA8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945851296246.5611361928129; Tue, 1 Oct 2019 09:04:11 -0700 (PDT) Received: from localhost ([::1]:44066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKd2-00021t-Nv for importer@patchew.org; Tue, 01 Oct 2019 12:03:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49917) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT1-00082w-Mk for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006XU-9m for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from relay.sw.ru ([185.231.240.75]:38372) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006WM-0v; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSx-0004xb-Q0; Tue, 01 Oct 2019 18:53:31 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 08/31] ARM TCG CPUs: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:56 +0300 Message-Id: <20191001155319.8066-9-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Vladimir Sementsov-Ogievskiy , Greg Kurz , qemu-arm@nongnu.org, Subbaraya Sundeep Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/arm/msf2-soc.c | 1 + hw/arm/virt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 008fd9327a..b76f45657e 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -85,6 +85,7 @@ static void m2sxxx_soc_initfn(Object *obj) =20 static void m2sxxx_soc_realize(DeviceState *dev_soc, Error **errp) { + ERRP_AUTO_PROPAGATE(); MSF2State *s =3D MSF2_SOC(dev_soc); DeviceState *dev, *armv7m; SysBusDevice *busdev; diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d74538b021..ce2e57fd59 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1793,6 +1793,7 @@ static char *virt_get_gic_version(Object *obj, Error = **errp) =20 static void virt_set_gic_version(Object *obj, const char *value, Error **e= rrp) { + ERRP_AUTO_PROPAGATE(); VirtMachineState *vms =3D VIRT_MACHINE(obj); =20 if (!strcmp(value, "3")) { @@ -1825,6 +1826,7 @@ static char *virt_get_iommu(Object *obj, Error **errp) =20 static void virt_set_iommu(Object *obj, const char *value, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtMachineState *vms =3D VIRT_MACHINE(obj); =20 if (!strcmp(value, "smmuv3")) { --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946076; cv=none; d=zoho.com; s=zohoarc; b=B07jl0636caKALJyR3edDUlsHcP9w6fpZ3fLX57knfIXIJXXCIuuSLiSrvdmEeLBeR5lpH7LqNsIpgHqzw5RDMnntnMhzoUVaZ78e51vAmTNVQkcfzZRm6s8xpTVjI5VVB66GxEKuy53lysRQMFSeO4pqccsnq9ZBCceM1jjW4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946076; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sr+wtUrdi+R2IGBNqAsEG5IsY2lI2rsDKdCxLWFV1ZM=; b=YOZMY6YRihbxl+7XKbMN+HMYLgQjt24puMaWM+iW88xivHF5u9Q0PIeybjlVotl9XLR7P+oA9h9hh7o9/aU9PQSBE5VS8DO6Gwvjrfv71rmQ/S3NvOOSgre8ZXG2Sx77akwoZn/xVRb4JMKc4X5xcmsApfvXe6CboPoCanWYIU0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946076141119.18685861038853; Tue, 1 Oct 2019 09:07:56 -0700 (PDT) Received: from localhost ([::1]:44114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKgs-0006Bp-BA for importer@patchew.org; Tue, 01 Oct 2019 12:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT2-00084y-Tp for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT1-0006Yq-59 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38394) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006X5-Tx; Tue, 01 Oct 2019 11:53:35 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSx-0004xb-Vt; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 09/31] PowerPC TCG CPUs: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:57 +0300 Message-Id: <20191001155319.8066-10-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Mark Cave-Ayland , Greg Kurz , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/ppc/mac_newworld.c | 1 + hw/ppc/pnv_lpc.c | 1 + hw/ppc/pnv_occ.c | 1 + hw/ppc/spapr.c | 1 + hw/ppc/spapr_irq.c | 1 + hw/ppc/spapr_pci.c | 1 + target/ppc/kvm.c | 2 ++ 7 files changed, 8 insertions(+) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index c5bbcc7433..1a37412d31 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -609,6 +609,7 @@ static char *core99_get_via_config(Object *obj, Error *= *errp) =20 static void core99_set_via_config(Object *obj, const char *value, Error **= errp) { + ERRP_AUTO_PROPAGATE(); Core99MachineState *cms =3D CORE99_MACHINE(obj); =20 if (!strcmp(value, "cuda")) { diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c index 9466d4a1be..5022afa2a8 100644 --- a/hw/ppc/pnv_lpc.c +++ b/hw/ppc/pnv_lpc.c @@ -681,6 +681,7 @@ static const TypeInfo pnv_lpc_power9_info =3D { =20 static void pnv_lpc_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); PnvLpcController *lpc =3D PNV_LPC(dev); Object *obj; Error *local_err =3D NULL; diff --git a/hw/ppc/pnv_occ.c b/hw/ppc/pnv_occ.c index 8bead2c930..735e5655da 100644 --- a/hw/ppc/pnv_occ.c +++ b/hw/ppc/pnv_occ.c @@ -181,6 +181,7 @@ static const TypeInfo pnv_occ_power9_type_info =3D { =20 static void pnv_occ_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); PnvOCC *occ =3D PNV_OCC(dev); PnvOCCClass *poc =3D PNV_OCC_GET_CLASS(occ); Object *obj; diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 08a2a5a770..617afb722c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4330,6 +4330,7 @@ int spapr_get_vcpu_id(PowerPCCPU *cpu) =20 void spapr_set_vcpu_id(PowerPCCPU *cpu, int cpu_index, Error **errp) { + ERRP_AUTO_PROPAGATE(); SpaprMachineState *spapr =3D SPAPR_MACHINE(qdev_get_machine()); MachineState *ms =3D MACHINE(spapr); int vcpu_id; diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 06fe2432ba..679f1306e4 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -549,6 +549,7 @@ static int spapr_irq_post_load_dual(SpaprMachineState *= spapr, int version_id) =20 static void spapr_irq_reset_dual(SpaprMachineState *spapr, Error **errp) { + ERRP_AUTO_PROPAGATE(); Error *local_err =3D NULL; =20 /* diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 7b71ad7c74..012ecdd40a 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1817,6 +1817,7 @@ static void spapr_phb_destroy_msi(gpointer opaque) =20 static void spapr_phb_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); /* We don't use SPAPR_MACHINE() in order to exit gracefully if the user * tries to add a sPAPR PHB to a non-pseries machine. */ diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 8c5b1f25cc..6ea7502cb9 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -237,6 +237,7 @@ static int kvm_booke206_tlb_init(PowerPCCPU *cpu) #if defined(TARGET_PPC64) static void kvm_get_smmu_info(struct kvm_ppc_smmu_info *info, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret; =20 assert(kvm_state !=3D NULL); @@ -2073,6 +2074,7 @@ int kvmppc_set_smt_threads(int smt) =20 void kvmppc_hint_smt_possible(Error **errp) { + ERRP_AUTO_PROPAGATE(); int i; GString *g; char *s; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945439; cv=none; d=zoho.com; s=zohoarc; b=n+5v6kWL2CSLFCDtf/dkmKTdy/Fn+jGop8A8d5VzoItW0rp+q+mnauZTkiU91fZMeFTl/A4QCFtxdJBRxbOpKLC0K+wuszaZy+FWpAR1O84HEJuFOHyP9PVkNzQiAonOoo3JdlR83P8p/+EGf5K8hZ6xLmtvtShltqztzt9HHEY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945439; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xn+JqqqiNnmejTQu+kpj/N6R7u0SIEYkc6x41S71rZk=; b=N3eLMYPqXeIcEEVHEMA7dRH5UtG1Occ0HZCeVKK1X/Y4pms1Qrl+npDrxAJpTu8q/smkW8hvKZ7VkW/GGGZ5eJE1PW9UXxNK65BlP+ZKb0buhnKFeKVuLlTodoy/5UDSE99h+FvT0jwxgo0fbtGKRg45KP/PnPa4eGr+Tx7FbwI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945439988243.07029298567022; Tue, 1 Oct 2019 08:57:19 -0700 (PDT) Received: from localhost ([::1]:43958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKWc-0003Bz-4O for importer@patchew.org; Tue, 01 Oct 2019 11:57:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49916) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT1-00082r-Lb for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006Xe-AU for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from relay.sw.ru ([185.231.240.75]:38366) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006WQ-1y; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSy-0004xb-4I; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 10/31] arm: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:58 +0300 Message-Id: <20191001155319.8066-11-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Vladimir Sementsov-Ogievskiy , Greg Kurz , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/intc/arm_gicv3_kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index 9c7f4ab871..e3b79d6179 100644 --- a/hw/intc/arm_gicv3_kvm.c +++ b/hw/intc/arm_gicv3_kvm.c @@ -766,6 +766,7 @@ static void vm_change_state_handler(void *opaque, int r= unning, =20 static void kvm_arm_gicv3_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); GICv3State *s =3D KVM_ARM_GICV3(dev); KVMARMGICv3Class *kgc =3D KVM_ARM_GICV3_GET_CLASS(s); bool multiple_redist_region_allowed; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945866; cv=none; d=zoho.com; s=zohoarc; b=VFA45WmbHfX9OZSN9QBIfJYrQgAWWKYJ925Wj7Y9esnUIT+5NmJ+HDwaQ/B++CE9icZyDkNbQRAKgJxdTjBaz0jxq2vZFXK94u2jsl2aGoKi54ndQb+mDZwSGE8+4tVheEdVZDjUDMAy5/SdZoWbuITjX3QEZZFz4QjHo/hLh7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945866; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=bqRi0ngAydRTVRCIxtPL2TAOdIZgRidOyU4/VOtPdcE=; b=hP6eR9nripGo91ydgPszwpph/uUNfjfkT174IM++Mm4B95IUcINihdphh6DGgp+vz8OMyvtdbdeCr3C7ipeAvibrkyhO9gDSfhJMuTM5IpOHmAeXwmFkaVKfQD51a9nz4k+1j4424V/UoTwJy4XkucmAk/Hd4lxbzFFuVV47gVY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945866981596.054167999724; Tue, 1 Oct 2019 09:04:26 -0700 (PDT) Received: from localhost ([::1]:44070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKdU-0002R8-Ul for importer@patchew.org; Tue, 01 Oct 2019 12:04:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT2-00084M-IF for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006XL-8u for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38370) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006WN-0f for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSy-0004xb-AU; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 11/31] SmartFusion2: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:52:59 +0300 Message-Id: <20191001155319.8066-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Vladimir Sementsov-Ogievskiy , Greg Kurz , Subbaraya Sundeep Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/misc/msf2-sysreg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/msf2-sysreg.c b/hw/misc/msf2-sysreg.c index ddc5a30c80..343351480d 100644 --- a/hw/misc/msf2-sysreg.c +++ b/hw/misc/msf2-sysreg.c @@ -127,6 +127,7 @@ static Property msf2_sysreg_properties[] =3D { =20 static void msf2_sysreg_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); MSF2SysregState *s =3D MSF2_SYSREG(dev); =20 if ((s->apb0div > 32 || !is_power_of_2(s->apb0div)) --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945631; cv=none; d=zoho.com; s=zohoarc; b=ChjrZxzDeQhDzqfPmIdzexCVoH05F0KynND4He/qalHaOiqIyghkNVQZ98lqfd7LLJfkeagnUs1V/RTng29EERSM0fhsqcLKDVc13//zzaMPlFcFAMl6NvbQU7ExyvYV5zLM6csWiWdNzr33a9/mLFMRndtvvpaHBEM3mNmi2mo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945631; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2f4hQhSLnIjbo2KGSeXghk4NVGigQ4HZe266C/l1Yr8=; b=du33+as+jMg07QYTUT7XAjEf10OV2Tuns8u/s04Vb7c1j0m/nWribnwMLRn35V2TCFh80SywKqvRXnLhiK/o6UJebF+20v9/q5ZpnN+bQxfkvkNM8tyRYiDLD+DcW00PdIbRdrrS8/Yc7qrunhhl2roR1xHIrcM4WxLCE/XdZxw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945631439211.58618975436025; Tue, 1 Oct 2019 09:00:31 -0700 (PDT) Received: from localhost ([::1]:44010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKZh-0006r6-9O for importer@patchew.org; Tue, 01 Oct 2019 12:00:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49923) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT1-00083F-Tm for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006Y6-N6 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from relay.sw.ru ([185.231.240.75]:38378) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006WV-C9; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSy-0004xb-G8; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 12/31] ASPEED BMCs: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:00 +0300 Message-Id: <20191001155319.8066-13-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Vladimir Sementsov-Ogievskiy , Andrew Jeffery , Greg Kurz , qemu-arm@nongnu.org, Joel Stanley , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/watchdog/wdt_aspeed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c index 9b93213417..a70d6dee63 100644 --- a/hw/watchdog/wdt_aspeed.c +++ b/hw/watchdog/wdt_aspeed.c @@ -243,6 +243,7 @@ static void aspeed_wdt_timer_expired(void *dev) =20 static void aspeed_wdt_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); AspeedWDTState *s =3D ASPEED_WDT(dev); Error *err =3D NULL; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945371; cv=none; d=zoho.com; s=zohoarc; b=PVn49o6neRcdEpPm9hFC1q99n9qdMkb5EdG4ANiX6GZsVjTobuhq/2qo8Gf3cmXmIlaUoYX42CspgiVy0aCoTsaLr1l3/FSmVMS1ffnivx0XWYMibggt1d5nQd6vl+ixu3DMOHcTevoeAEQbZe191gXZnZak3yPscfJV6KlpTJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945371; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=0N1BPoM+uBsXcY0eT8DBhOm/Zw0XtUkA3AVpnBSEIEE=; b=c3ILCn8/Ygg8j83yK8oRxX2/jd3HyIwksGQdTrzBeOrybXCsLTyzXh6aXCDaggtJxTC0VqJXdX+Bw3wugF5Wx2Eg86lHvAiugw8cR+58VAx7tOJPCDzGczmvGCwfmEjzsUb6E7uo01ktUxWgxAepzRxSfLbCimdUVodrYUlnWto= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945370778456.2391995173614; Tue, 1 Oct 2019 08:56:10 -0700 (PDT) Received: from localhost ([::1]:43954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKVS-0001uw-8N for importer@patchew.org; Tue, 01 Oct 2019 11:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49935) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT2-00083l-75 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006Y1-MT for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38384) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006WX-C3 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSy-0004xb-L2; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 13/31] Boston: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:01 +0300 Message-Id: <20191001155319.8066-14-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Paul Burton , Vladimir Sementsov-Ogievskiy , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/core/loader-fit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 3ee9fb2f2e..84f35a1fe2 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -120,6 +120,7 @@ static int fit_load_kernel(const struct fit_loader *ldr= , const void *itb, int cfg, void *opaque, hwaddr *pend, Error **errp) { + ERRP_AUTO_PROPAGATE(); const char *name; const void *data; const void *load_data; @@ -178,6 +179,7 @@ static int fit_load_fdt(const struct fit_loader *ldr, c= onst void *itb, int cfg, void *opaque, const void *match_data, hwaddr kernel_end, Error **errp) { + ERRP_AUTO_PROPAGATE(); const char *name; const void *data; const void *load_data; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946344; cv=none; d=zoho.com; s=zohoarc; b=JKvo0jhp7fDVJ+9t4fmq2zknvgLpvRFRPlGmSgNF7xto6cZbpSsGXh9LHLGWOZ+RfkT7jjZl0K+Dht/2uIBDOy/523NA00wfrcYsneY+lnfT88lCywvPPMcEprEql6wWTrBgjIsxEDZSq/w4ZsU0tgm1zLMqhBZhShGe8UZSIb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946344; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=q0yckdtz9kT26dPbZOth9C0cysCSP07z0YQcqDfZFu4=; b=OWh/fOMAN6TOzmiwc1t/6746UkORDSCiV7s/to6Fn5o0aVyFkrx15gRWy85xM+6fO+oQFU4y2NjXy268+1yRUzgJHs5uKQkmPDVOFIwwVGh6bGg1nywDLFblixDU2s0T7fOFM763QEGdGYoIELxNx+W4w/QimAlI502d3/gH3aY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946344276837.3772958615732; Tue, 1 Oct 2019 09:12:24 -0700 (PDT) Received: from localhost ([::1]:44180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKlC-0002jx-En for importer@patchew.org; Tue, 01 Oct 2019 12:12:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49966) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT2-00084r-Qt for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006Ya-VJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:36 -0400 Received: from relay.sw.ru ([185.231.240.75]:38390) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006Wr-Lq; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSy-0004xb-Ps; Tue, 01 Oct 2019 18:53:32 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 14/31] PowerNV (Non-Virtualized): Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:02 +0300 Message-Id: <20191001155319.8066-15-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Vladimir Sementsov-Ogievskiy , qemu-ppc@nongnu.org, Greg Kurz , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/intc/pnv_xive.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index ed6e9d71bb..61ad7d46fe 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1659,6 +1659,7 @@ static void pnv_xive_init(Object *obj) =20 static void pnv_xive_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); PnvXive *xive =3D PNV_XIVE(dev); XiveSource *xsrc =3D &xive->ipi_source; XiveENDSource *end_xsrc =3D &xive->end_source; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946137; cv=none; d=zoho.com; s=zohoarc; b=ha4d6vYD9nnv7tN/lm19vKB0jbi1cTGSavdpE0KT0TF4TbcrBRDiOtNx795JoddRLyzR9d5JPmXbrqroLKdYQJjgivblLIQpE0RgOq6DseLSSSHwU4JtkPOq52BlgbdPXL36UBEgUod2Sq7DFZWVYNWUi+X2RBiPje15amWetzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946137; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=vbBz2GNGqbrCnSH37/rh2cuAlklFmBw/2bM444SWlZk=; b=d/6XCrikB7bXFHDOdn83NNAM1gUlfUhUAcxDbpDsztkFndG6LcqeHVvZmXwRB4Phw8ziFuUQDpArxkQt71czRQz47RdLogtvEo0wXHB/8X9lLlDO1bMmLcSsRj9kIXHot4fXmA2kmwk17uHp5M7/0k2zXz/2f9n1UOq/eIDJRSw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946137410542.7998265891915; Tue, 1 Oct 2019 09:08:57 -0700 (PDT) Received: from localhost ([::1]:44122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKhr-0007CF-Rv for importer@patchew.org; Tue, 01 Oct 2019 12:08:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49924) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKT1-00083H-Ux for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKT0-0006YC-Nc for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:35 -0400 Received: from relay.sw.ru ([185.231.240.75]:38386) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKT0-0006Wc-CP for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:34 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSz-0004xb-4e; Tue, 01 Oct 2019 18:53:33 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 15/31] PCI: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:03 +0300 Message-Id: <20191001155319.8066-16-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci-bridge/pcie_root_port.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c index 012c2cb12c..a1b4989534 100644 --- a/hw/pci-bridge/pcie_root_port.c +++ b/hw/pci-bridge/pcie_root_port.c @@ -60,6 +60,7 @@ static void rp_reset(DeviceState *qdev) =20 static void rp_realize(PCIDevice *d, Error **errp) { + ERRP_AUTO_PROPAGATE(); PCIEPort *p =3D PCIE_PORT(d); PCIESlot *s =3D PCIE_SLOT(d); PCIDeviceClass *dc =3D PCI_DEVICE_GET_CLASS(d); --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945583; cv=none; d=zoho.com; s=zohoarc; b=lXEKeDmQWk4GsXoLCYmjTBNw8TtVT4btsP2Ux7Em1IV0pQ8XC0naaVTeyY+gTBULs4Qqrpo+P1vbvmpmgFtUKiiVzH8wu5TZVgf6JCmxYxZWLgmUnJ60XY1zPfWajbHh+9Qe67VJqpq0vdQ1vptagGfPNG0dBNLeGV71XO8Luhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945583; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=2H+6PnkCCoo6vFj7Du12JWwsY2XCvj9hTALtbtxRCP8=; b=bS4OpgDcGOUHnbQwpphl0zNtl4fxObXkLmzyE2BfJUNbSXONbKiomMAm2Lie9n8AcYt4CZjZQIkdZyWqEuvEEdyIM/rU+XVq9331tSKPtXruEnIIY0ikrO1mkrrdKeOP497ECatBSnU4zonKg7FOG7m/N/ppKsr24o4EERYz1tw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156994558372720.495579436931962; Tue, 1 Oct 2019 08:59:43 -0700 (PDT) Received: from localhost ([::1]:44002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKYw-0006DI-Ez for importer@patchew.org; Tue, 01 Oct 2019 11:59:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50116) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTG-0008LV-A9 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTE-0006lM-KL for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38412) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTD-0006YI-T0 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:48 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSz-0004xb-Al; Tue, 01 Oct 2019 18:53:33 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 16/31] SCSI: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:04 +0300 Message-Id: <20191001155319.8066-17-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Paolo Bonzini , Vladimir Sementsov-Ogievskiy , Greg Kurz , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/scsi/scsi-disk.c | 1 + hw/scsi/scsi-generic.c | 1 + hw/scsi/vhost-scsi.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 915641a0f1..48165dc128 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2597,6 +2597,7 @@ static int get_device_type(SCSIDiskState *s) =20 static void scsi_block_realize(SCSIDevice *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); SCSIDiskState *s =3D DO_UPCAST(SCSIDiskState, qdev, dev); AioContext *ctx; int sg_version; diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index e7798ebcd0..4c7543801f 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -653,6 +653,7 @@ static void scsi_generic_reset(DeviceState *dev) =20 static void scsi_generic_realize(SCSIDevice *s, Error **errp) { + ERRP_AUTO_PROPAGATE(); int rc; int sg_version; struct sg_scsi_id scsiid; diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index c693fc748a..c01c6dfbe2 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -165,6 +165,7 @@ static const VMStateDescription vmstate_virtio_vhost_sc= si =3D { =20 static void vhost_scsi_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtIOSCSICommon *vs =3D VIRTIO_SCSI_COMMON(dev); VHostSCSICommon *vsc =3D VHOST_SCSI_COMMON(dev); Error *err =3D NULL; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946917; cv=none; d=zoho.com; s=zohoarc; b=R0NLFgunCQd4reQD95HcNxQWFNbGYLgO7irgn9MshzoIhLFdjZW3M6mIbKVV8xSD5JqYYkXgu2JXdNdEeh7mDtLPyRDoeEr5XCO/enNwanKjjX6e5dUEWXVpxVDTIXmrVDNWtAgX8DjloKwgTLOOaKlKVLY3O2fc7tHs3Ql+HiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946917; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=4R2MoFXC8eaiOhb/XBEfeueh9SHhMEQNuByXUaHZ2fo=; b=lXV5QCVTPvNSDiRozP8RfTRB6xcZybFJljgVJiuHTBFGQQ0WWfpsGFcw4CHQIN8GEZjTirb6tSs6FOykYFDk/46+xs361K+fFR/03jzR0N+zVDpBepyVzcM/G5gYzPRPyLsKxJcXesR877FfLOF+sgvQd12tyHVnGE3NO/ngE5A= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946917773691.5027898253037; Tue, 1 Oct 2019 09:21:57 -0700 (PDT) Received: from localhost ([::1]:44324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKuR-0002Yn-Kb for importer@patchew.org; Tue, 01 Oct 2019 12:21:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50110) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTG-0008LS-5F for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTD-0006kD-SQ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:49 -0400 Received: from relay.sw.ru ([185.231.240.75]:38398) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTB-0006XB-9s for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:47 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSz-0004xb-K0; Tue, 01 Oct 2019 18:53:33 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 17/31] USB: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:05 +0300 Message-Id: <20191001155319.8066-18-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/usb/ccid-card-emulated.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 291e41db8a..958791e817 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -488,6 +488,7 @@ static uint32_t parse_enumeration(char *str, =20 static void emulated_realize(CCIDCardState *base, Error **errp) { + ERRP_AUTO_PROPAGATE(); EmulatedState *card =3D EMULATED_CCID_CARD(base); VCardEmulError ret; const EnumTable *ptable; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946861; cv=none; d=zoho.com; s=zohoarc; b=OlzS/9lHt84rcNXk7Rk6ZhiE7tDkEOyT7k1FYtrDbrsl2+5RfzlBw3TNfudvZXPNsH3a2NnMc7uJ9VmYKyJ8P+79Sv9FYnzzDRW/PMnypZFDEYcYE5IovSu9Om4ebiAphpTqGSZ1krP8UKS45UHKtPGazsBh16S/To/wiFGVu70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946861; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=c1GIB3InTsLOV9aMm3y3nCw38uHZadyFZo6NBvDXbDE=; b=ME/efXpHx2dXvnrh5GLK3nlvjGApAG3f0TIGcV4B5eW7C7TUgVGR+VfoqLy4p2GE/0U2OOR0AW85N/qGi5V6u2P/tWJWCO+DxDE23SHi9p+MkZzLnUwqQFgdde6sbPXtg2MBi9vxPpSiwcmYGNyjPaTAZKPiQrhPn/bGiB+FQ5M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156994686111760.320577721089535; Tue, 1 Oct 2019 09:21:01 -0700 (PDT) Received: from localhost ([::1]:44308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKtR-0001Rq-I9 for importer@patchew.org; Tue, 01 Oct 2019 12:20:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50178) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008Mq-0f for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTF-0006mY-2k for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38424) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006YJ-1N for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:48 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKSz-0004xb-SA; Tue, 01 Oct 2019 18:53:34 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 18/31] VFIO: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:06 +0300 Message-Id: <20191001155319.8066-19-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Williamson , Vladimir Sementsov-Ogievskiy , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/vfio/common.c | 3 +++ hw/vfio/pci-quirks.c | 1 + hw/vfio/pci.c | 3 +++ hw/vfio/platform.c | 1 + 4 files changed, 8 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 3e03c495d8..b0f3f64f5d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -136,6 +136,7 @@ static const char *index_to_str(VFIODevice *vbasedev, i= nt index) int vfio_set_irq_signaling(VFIODevice *vbasedev, int index, int subindex, int action, int fd, Error **errp) { + ERRP_AUTO_PROPAGATE(); struct vfio_irq_set *irq_set; int argsz, ret =3D 0; const char *name; @@ -1437,6 +1438,7 @@ static void vfio_disconnect_container(VFIOGroup *grou= p) =20 VFIOGroup *vfio_get_group(int groupid, AddressSpace *as, Error **errp) { + ERRP_AUTO_PROPAGATE(); VFIOGroup *group; char path[32]; struct vfio_group_status status =3D { .argsz =3D sizeof(status) }; @@ -1526,6 +1528,7 @@ void vfio_put_group(VFIOGroup *group) int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vbasedev, Error **errp) { + ERRP_AUTO_PROPAGATE(); struct vfio_device_info dev_info =3D { .argsz =3D sizeof(dev_info) }; int ret, fd; =20 diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index 136f3a9ad6..d8b6ef7021 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -2139,6 +2139,7 @@ const PropertyInfo qdev_prop_nv_gpudirect_clique =3D { =20 static int vfio_add_nv_gpudirect_cap(VFIOPCIDevice *vdev, Error **errp) { + ERRP_AUTO_PROPAGATE(); PCIDevice *pdev =3D &vdev->pdev; int ret, pos =3D 0xC8; =20 diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c5e6fe61cb..4b537bce2c 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -1916,6 +1916,7 @@ static void vfio_check_af_flr(VFIOPCIDevice *vdev, ui= nt8_t pos) =20 static int vfio_add_std_cap(VFIOPCIDevice *vdev, uint8_t pos, Error **errp) { + ERRP_AUTO_PROPAGATE(); PCIDevice *pdev =3D &vdev->pdev; uint8_t cap_id, next, size; int ret; @@ -2469,6 +2470,7 @@ int vfio_populate_vga(VFIOPCIDevice *vdev, Error **er= rp) =20 static void vfio_populate_device(VFIOPCIDevice *vdev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VFIODevice *vbasedev =3D &vdev->vbasedev; struct vfio_region_info *reg_info; struct vfio_irq_info irq_info =3D { .argsz =3D sizeof(irq_info) }; @@ -2700,6 +2702,7 @@ static void vfio_unregister_req_notifier(VFIOPCIDevic= e *vdev) =20 static void vfio_realize(PCIDevice *pdev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VFIOPCIDevice *vdev =3D PCI_VFIO(pdev); VFIODevice *vbasedev_iter; VFIOGroup *group; diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index d7598c6152..236e5f8f57 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -617,6 +617,7 @@ static int vfio_base_device_init(VFIODevice *vbasedev, = Error **errp) */ static void vfio_platform_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VFIOPlatformDevice *vdev =3D VFIO_PLATFORM_DEVICE(dev); SysBusDevice *sbdev =3D SYS_BUS_DEVICE(dev); VFIODevice *vbasedev =3D &vdev->vbasedev; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947119; cv=none; d=zoho.com; s=zohoarc; b=h0QeCWmAImLJKiNbkjrmXRHpCcCMXFG9+hDlFrduPbAHjgtJebuGyIu1vMQOxW0/BhgVzeK7+DzRNOuTJz141yyzHQlsONyJtxHVag/YxuR1r4M8WrYWZVmQq+VCQE3y7hcE+wc2TOYLECmWpxbrLBSj4wfZaDBmKij5y2kYIz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947119; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=qDI7HyqDLxsS9VICenb11wkIj3qOVezKdaPXYvY3VHM=; b=YQZfc3+4ajhiFkFLOvMf4FxSv0OyiVJ1VZbhOYqbiIp6xfoDH8Z3vZFeE6ifMGTdMq2y4Wia1cksODVkl+EUN0tLVF5quYLyrpo3dihbfUkmA3GzLxpNYmVLIvtdoOXcdF7M2Hyhve8miGh6FJFMPfu4oU/ZIeTsMxtYjK/4kKY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156994711932084.7354387137392; Tue, 1 Oct 2019 09:25:19 -0700 (PDT) Received: from localhost ([::1]:44390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKxh-0006O3-Pv for importer@patchew.org; Tue, 01 Oct 2019 12:25:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50124) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTG-0008Lb-Du for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTF-0006mo-50 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38414) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006YH-33 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:48 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT0-0004xb-5G; Tue, 01 Oct 2019 18:53:34 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 19/31] vhost: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:07 +0300 Message-Id: <20191001155319.8066-20-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/virtio/vhost-vsock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c index f5744363a8..61ade0fa65 100644 --- a/hw/virtio/vhost-vsock.c +++ b/hw/virtio/vhost-vsock.c @@ -300,6 +300,7 @@ static const VMStateDescription vmstate_virtio_vhost_vs= ock =3D { =20 static void vhost_vsock_device_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); VHostVSock *vsock =3D VHOST_VSOCK(dev); int vhostfd; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947634; cv=none; d=zoho.com; s=zohoarc; b=BqyKR8GVw01owSlne8B/erRY3RZ37cRyEGo1DRzVB5NKasfvvVQ6M5cJIwf65JHlHzVDwH5rEgonbGCbDmgt/NwsOlLCTx6ORHi1WzKYVCoXmCPwSzlw2kkxkrl4G9wKZgE3BgTX6HceOSBUDl/9rf3vEtck2Hc8lEtPfs0+Q4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947634; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TM7s7RNDf074ZfmvE73HNDeDiR8tWGF8VhQOpfF8Xo8=; b=d8wukGkoMqH8ND8dueWlkEyigrV42afRDTsHRQfBr+zmwXotrw/d7fKid4WvY9wVD0YmeQizyTIgp7hijmKHNFsJa+ZwaTq5/qcM850f5hXyQObZbp5YD1gW9zSuDPhQ7QSq5pVjrfc0LTeuZzZVl5GzmcYt++9Xnp8DHAMIEeg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947634522704.458120207909; Tue, 1 Oct 2019 09:33:54 -0700 (PDT) Received: from localhost ([::1]:44558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFL5t-0005kA-D2 for importer@patchew.org; Tue, 01 Oct 2019 12:33:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50254) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTO-0008UI-T0 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTN-0006tA-Cj for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:58 -0400 Received: from relay.sw.ru ([185.231.240.75]:38438) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTN-0006Yn-5H; Tue, 01 Oct 2019 11:53:57 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT0-0004xb-Fg; Tue, 01 Oct 2019 18:53:34 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 20/31] virtio: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:08 +0300 Message-Id: <20191001155319.8066-21-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, "Michael S. Tsirkin" , Greg Kurz , Max Reitz , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/dataplane/virtio-blk.c | 1 + hw/virtio/virtio-pci.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-bl= k.c index 119906a5fe..f8a1e70886 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -85,6 +85,7 @@ bool virtio_blk_data_plane_create(VirtIODevice *vdev, Vir= tIOBlkConf *conf, VirtIOBlockDataPlane **dataplane, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtIOBlockDataPlane *s; BusState *qbus =3D BUS(qdev_get_parent_bus(DEVICE(vdev))); VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c73..a36e5f6990 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1525,6 +1525,7 @@ static void virtio_pci_pre_plugged(DeviceState *d, Er= ror **errp) /* This is called by virtio-bus just after the device is plugged. */ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtIOPCIProxy *proxy =3D VIRTIO_PCI(d); VirtioBusState *bus =3D &proxy->bus; bool legacy =3D virtio_pci_legacy(proxy); @@ -1684,6 +1685,7 @@ static void virtio_pci_device_unplugged(DeviceState *= d) =20 static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); VirtIOPCIProxy *proxy =3D VIRTIO_PCI(pci_dev); VirtioPCIClass *k =3D VIRTIO_PCI_GET_CLASS(pci_dev); bool pcie_port =3D pci_bus_is_express(pci_get_bus(pci_dev)) && --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947339; cv=none; d=zoho.com; s=zohoarc; b=CR9cdDYwNSW4IwO3KmiFVpB7UYkMEQFwvNYsRdUMgLBNQyi/5Lwur/uqJ+jO2tGo9VHeP9922V0i/VsJubt82cJnE3K5t2ghpo0jua1QQE/oJePdlLxlmLRjgRzeVrSr6JyNd3U2Q3iGAlIWM933UIkvF3bQu9pVed3OVphd+5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947339; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XwB+qRDlQe4Zy3OiSKYJK0oW76y7JYQB3bTF3pHRIT8=; b=XE+oPpRzBj38SzXh7BmX5WfrCpFwcWIRf83pngHL380vONYZqr1nKjpYBoEpPExBwB5Cc38vwoabl03uMU9T2HdMZ9dCo8MFciA8Gp0hPSMEFa9iNAOnC6Xm5iom2gcf9iYla6B9BXOFhUzH+QMApvKpwnA5Pi0Z+rpN1KyfZmY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947339830927.8649152520211; Tue, 1 Oct 2019 09:28:59 -0700 (PDT) Received: from localhost ([::1]:44432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFL1E-0001mZ-TM for importer@patchew.org; Tue, 01 Oct 2019 12:28:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50185) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008NH-5v for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006nb-5Y for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38462) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006ZQ-Ga for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:49 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT0-0004xb-VO; Tue, 01 Oct 2019 18:53:35 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 21/31] virtio-9p: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:09 +0300 Message-Id: <20191001155319.8066-22-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/9pfs/9p-local.c | 1 + hw/9pfs/9p-proxy.c | 1 + hw/9pfs/9p.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 08e673a79c..fccbf758bd 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -1471,6 +1471,7 @@ static void local_cleanup(FsContext *ctx) =20 static void error_append_security_model_hint(Error **errp) { + ERRP_AUTO_PROPAGATE(); error_append_hint(errp, "Valid options are: security_model=3D" "[passthrough|mapped-xattr|mapped-file|none]\n"); } diff --git a/hw/9pfs/9p-proxy.c b/hw/9pfs/9p-proxy.c index 57a8c1c808..9291c8efa2 100644 --- a/hw/9pfs/9p-proxy.c +++ b/hw/9pfs/9p-proxy.c @@ -1116,6 +1116,7 @@ static int connect_namedsocket(const char *path, Erro= r **errp) =20 static void error_append_socket_sockfd_hint(Error **errp) { + ERRP_AUTO_PROPAGATE(); error_append_hint(errp, "Either specify socket=3D/some/path where /som= e/path" " points to a listening AF_UNIX socket or sock_fd=3D= fd" " where fd is a file descriptor to a connected AF_UN= IX" diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index cce2366219..1df2749e03 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -3552,6 +3552,7 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr) int v9fs_device_realize_common(V9fsState *s, const V9fsTransport *t, Error **errp) { + ERRP_AUTO_PROPAGATE(); int i, len; struct stat stat; FsDriverEntry *fse; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947878; cv=none; d=zoho.com; s=zohoarc; b=mcwAD9hg5UyyUoXrTjST54wowdphvxa8wN1N2O0qd+tmANINsXGH7Fd1MLkmkLRU+kD/ZwhzUkbNPcqoVwJ56HaGNXMH1ssAN3zmANl632gCbsvL6oS7/ZaGap8B65moSpNeO8TlqSnVy94q86jUj4i5RB4M3l2JYGeVpGHOEjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947878; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=/WUW0vLTp9DMmBSLUaprMIDSJ5dTrMpb/aAocPFEX4A=; b=EvZcd0qlC0UpU8dptytTKwEYVpGr9TUD91gci/1nhIXPLmYNKnlvtQsEOTXH5z7NmKbULPVD4tQvaNCCEN7DYnAupIlP5XHeHa32DDMXQEmNxFbRdPAICYu/Em8VjDGlSC31nUBtx4R3EqKCWWTDPr3Camx1RO00xh2cySZbIk8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947878513725.2918127814206; Tue, 1 Oct 2019 09:37:58 -0700 (PDT) Received: from localhost ([::1]:44622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFL9w-0001Bm-NQ for importer@patchew.org; Tue, 01 Oct 2019 12:37:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50272) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTQ-0008Vk-GX for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTO-0006tw-7r for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:59 -0400 Received: from relay.sw.ru ([185.231.240.75]:38464) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTN-0006ZZ-W0; Tue, 01 Oct 2019 11:53:58 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT1-0004xb-Eu; Tue, 01 Oct 2019 18:53:35 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 22/31] XIVE: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:10 +0300 Message-Id: <20191001155319.8066-23-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Vladimir Sementsov-Ogievskiy , qemu-ppc@nongnu.org, Greg Kurz , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/intc/xive.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index b7417210d8..926cb6741d 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -570,6 +570,7 @@ static void xive_tctx_reset(void *dev) =20 static void xive_tctx_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); XiveTCTX *tctx =3D XIVE_TCTX(dev); PowerPCCPU *cpu; CPUPPCState *env; @@ -1050,6 +1051,7 @@ static void xive_source_reset(void *dev) =20 static void xive_source_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); XiveSource *xsrc =3D XIVE_SOURCE(dev); Object *obj; Error *local_err =3D NULL; @@ -1798,6 +1800,7 @@ static const MemoryRegionOps xive_end_source_ops =3D { =20 static void xive_end_source_realize(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); XiveENDSource *xsrc =3D XIVE_END_SOURCE(dev); Object *obj; Error *local_err =3D NULL; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569947070; cv=none; d=zoho.com; s=zohoarc; b=if3RQw1uW6dAoxhaCLz0gcGx+HSmM79QUBBSLgbvtesmar8gbV/OFI8Nx1W1OlvRvNxH8sp12GmxPyIuJnNCTSRgYB09y/dvqk39FepBk7WEM8d4e2kiAFkwI7kkEBAnBaJXsPaoayy6BdY7pSj25L27+w33xpPQWqE9n8uqy74= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569947070; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=26ZQjW5oc3P7ISFLn9t2B/PMbkN0bX1vBXv9yJa0Kjw=; b=I5oOyXa+M78Ud3z/tztHFmA70oE7SJZcJbx0M70Agk0YOQLgaHA2FFlM9uBzfxuvhFTPW+5ELAV894ScuvVYvp/jdJppkpAh6gTHjbLPumEdjDpd4eUOUGC/uspZC3e6BP04O4KCVWthPY+N+jguomcphjLmLqQ92RofVrEIzlo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569947070754109.52104521407296; Tue, 1 Oct 2019 09:24:30 -0700 (PDT) Received: from localhost ([::1]:44384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKwv-0005P9-Id for importer@patchew.org; Tue, 01 Oct 2019 12:24:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50295) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTR-00006L-2e for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTO-0006te-1q for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:00 -0400 Received: from relay.sw.ru ([185.231.240.75]:38492) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTN-0006ae-Qw; Tue, 01 Oct 2019 11:53:58 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT1-0004xb-Lz; Tue, 01 Oct 2019 18:53:35 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 23/31] block: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:11 +0300 Message-Id: <20191001155319.8066-24-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, Jeff Cody , Stefan Weil , Greg Kurz , Max Reitz , integration@gluster.org, John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 1 + block.c | 3 +++ block/backup.c | 1 + block/dirty-bitmap.c | 1 + block/file-posix.c | 4 ++++ block/gluster.c | 2 ++ block/qcow.c | 1 + block/qcow2-bitmap.c | 1 + block/qcow2.c | 3 +++ block/vdi.c | 1 + block/vhdx-log.c | 1 + block/vmdk.c | 1 + block/vpc.c | 1 + 13 files changed, 21 insertions(+) diff --git a/include/block/nbd.h b/include/block/nbd.h index 316fd705a9..330f40142a 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -360,6 +360,7 @@ void nbd_server_start(SocketAddress *addr, const char *= tls_creds, static inline int nbd_read(QIOChannel *ioc, void *buffer, size_t size, const char *desc, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret =3D qio_channel_read_all(ioc, buffer, size, errp) < 0 ? -EIO := 0; =20 if (ret < 0) { diff --git a/block.c b/block.c index 5944124845..5dfcfc9b90 100644 --- a/block.c +++ b/block.c @@ -1565,6 +1565,7 @@ fail_opts: =20 static QDict *parse_json_filename(const char *filename, Error **errp) { + ERRP_AUTO_PROPAGATE(); QObject *options_obj; QDict *options; int ret; @@ -2592,6 +2593,7 @@ out: int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, const char *bdref_key, Error **errp) { + ERRP_AUTO_PROPAGATE(); char *backing_filename =3D NULL; char *bdref_key_dot; const char *reference =3D NULL; @@ -2823,6 +2825,7 @@ static BlockDriverState *bdrv_append_temp_snapshot(Bl= ockDriverState *bs, QDict *snapshot_options, Error **errp) { + ERRP_AUTO_PROPAGATE(); /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename =3D g_malloc0(PATH_MAX + 1); int64_t total_size; diff --git a/block/backup.c b/block/backup.c index 763f0d7ff6..58488a21fb 100644 --- a/block/backup.c +++ b/block/backup.c @@ -583,6 +583,7 @@ static const BlockJobDriver backup_job_driver =3D { static int64_t backup_calculate_cluster_size(BlockDriverState *target, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret; BlockDriverInfo bdi; =20 diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 134e0c9a0c..099ed74dfa 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -237,6 +237,7 @@ static bool bdrv_dirty_bitmap_recording(BdrvDirtyBitmap= *bitmap) int bdrv_dirty_bitmap_check(const BdrvDirtyBitmap *bitmap, uint32_t flags, Error **errp) { + ERRP_AUTO_PROPAGATE(); if ((flags & BDRV_BITMAP_BUSY) && bdrv_dirty_bitmap_busy(bitmap)) { error_setg(errp, "Bitmap '%s' is currently in use by another" " operation and cannot be used", bitmap->name); diff --git a/block/file-posix.c b/block/file-posix.c index f12c06de2d..db7a5b7e1a 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -320,6 +320,7 @@ static bool raw_is_io_aligned(int fd, void *buf, size_t= len) =20 static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVRawState *s =3D bs->opaque; char *buf; size_t max_align =3D MAX(MAX_BLOCKSIZE, getpagesize()); @@ -473,6 +474,7 @@ static int raw_open_common(BlockDriverState *bs, QDict = *options, int bdrv_flags, int open_flags, bool device, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVRawState *s =3D bs->opaque; QemuOpts *opts; Error *local_err =3D NULL; @@ -817,6 +819,7 @@ static int raw_handle_perm_lock(BlockDriverState *bs, uint64_t new_perm, uint64_t new_shared, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVRawState *s =3D bs->opaque; int ret =3D 0; Error *local_err =3D NULL; @@ -2232,6 +2235,7 @@ static int64_t raw_get_allocated_file_size(BlockDrive= rState *bs) static int coroutine_fn raw_co_create(BlockdevCreateOptions *options, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockdevCreateOptionsFile *file_opts; Error *local_err =3D NULL; int fd; diff --git a/block/gluster.c b/block/gluster.c index 64028b2cba..a69e89b42a 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -419,6 +419,7 @@ out: static struct glfs *qemu_gluster_glfs_init(BlockdevOptionsGluster *gconf, Error **errp) { + ERRP_AUTO_PROPAGATE(); struct glfs *glfs; int ret; int old_errno; @@ -694,6 +695,7 @@ static int qemu_gluster_parse(BlockdevOptionsGluster *g= conf, const char *filename, QDict *options, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret; if (filename) { ret =3D qemu_gluster_parse_uri(gconf, filename); diff --git a/block/qcow.c b/block/qcow.c index 5bdf72ba33..0caf94c8f8 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -117,6 +117,7 @@ static QemuOptsList qcow_runtime_opts =3D { static int qcow_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVQcowState *s =3D bs->opaque; unsigned int len, i, shift; int ret; diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index b2487101ed..90f2f010f2 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -1618,6 +1618,7 @@ bool qcow2_can_store_new_dirty_bitmap(BlockDriverStat= e *bs, uint32_t granularity, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVQcow2State *s =3D bs->opaque; bool found; Qcow2BitmapList *bm_list; diff --git a/block/qcow2.c b/block/qcow2.c index 4d16393e61..a8f0bf3cae 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1207,6 +1207,7 @@ static int qcow2_update_options(BlockDriverState *bs,= QDict *options, static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { + ERRP_AUTO_PROPAGATE(); BDRVQcow2State *s =3D bs->opaque; unsigned int len, i; int ret =3D 0; @@ -3036,6 +3037,7 @@ static uint64_t qcow2_opt_get_refcount_bits_del(QemuO= pts *opts, int version, static int coroutine_fn qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockdevCreateOptionsQcow2 *qcow2_opts; QDict *options; =20 @@ -3740,6 +3742,7 @@ fail: static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t of= fset, PreallocMode prealloc, Error **e= rrp) { + ERRP_AUTO_PROPAGATE(); BDRVQcow2State *s =3D bs->opaque; uint64_t old_length; int64_t new_l1_size; diff --git a/block/vdi.c b/block/vdi.c index 806ba7f53c..5259cce24b 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -735,6 +735,7 @@ nonallocating_write: static int coroutine_fn vdi_co_do_create(BlockdevCreateOptions *create_opt= ions, size_t block_size, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockdevCreateOptionsVdi *vdi_opts; int ret =3D 0; uint64_t bytes =3D 0; diff --git a/block/vhdx-log.c b/block/vhdx-log.c index fdd3a7adc3..176e03327b 100644 --- a/block/vhdx-log.c +++ b/block/vhdx-log.c @@ -748,6 +748,7 @@ exit: int vhdx_parse_log(BlockDriverState *bs, BDRVVHDXState *s, bool *flushed, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret =3D 0; VHDXHeader *hdr; VHDXLogSequence logs =3D { 0 }; diff --git a/block/vmdk.c b/block/vmdk.c index fed3b50c8a..6b10830d94 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1078,6 +1078,7 @@ static const char *next_line(const char *s) static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, QDict *options, Error **errp) { + ERRP_AUTO_PROPAGATE(); int ret; int matches; char access[11]; diff --git a/block/vpc.c b/block/vpc.c index 5cd3890780..90d0cae862 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -971,6 +971,7 @@ static int calculate_rounded_image_size(BlockdevCreateO= ptionsVpc *vpc_opts, static int coroutine_fn vpc_co_create(BlockdevCreateOptions *opts, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockdevCreateOptionsVpc *vpc_opts; BlockBackend *blk =3D NULL; BlockDriverState *bs =3D NULL; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946110; cv=none; d=zoho.com; s=zohoarc; b=UypwJfKGSPPmgESU7vInrDgXoTNXwivynxkAtI7mWkLBCO/QnfDuQhaRTva+njmXedhoPSo0kfgagxIzNR4jPC+9cL+ovD62a9esMUuikCDR0Q9W7Q+NVII4gVCMMeq1YrsM5vRdcmZfU0ofQAYMB/1Ftx8JxT3Imaa3bjGzS/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946110; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=hif1sKeBKKhmR8KLIEoYnD4OI3jwkv+bWxPvVcjeSBI=; b=DU7O3mmNMrDu2lfyPyiEJgs65Y9L4rR8ko+EPRAV52oBFFzxPSmhARhYX/38Cc4FiVVEL3cS+I3lp0+Kn2r98kjrYtNVa/kuCez5mU7YQZnYERfHYDbaAQUhJTD8jmA8JhMpy8rwUL9CddSMA1tpFyERy3Jwo7hCJ9A6/QZGVPU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946110362387.7738753627075; Tue, 1 Oct 2019 09:08:30 -0700 (PDT) Received: from localhost ([::1]:44116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKhP-0006fm-51 for importer@patchew.org; Tue, 01 Oct 2019 12:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50123) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTG-0008La-EJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTF-0006mj-4k for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38500) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006bI-18 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:48 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT1-0004xb-Vq; Tue, 01 Oct 2019 18:53:36 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 24/31] chardev: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:12 +0300 Message-Id: <20191001155319.8066-25-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Vladimir Sementsov-Ogievskiy , Greg Kurz , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- chardev/spice.c | 1 + 1 file changed, 1 insertion(+) diff --git a/chardev/spice.c b/chardev/spice.c index 241e2b7770..ce2145fb19 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -267,6 +267,7 @@ static void qemu_chr_open_spice_vmc(Chardev *chr, bool *be_opened, Error **errp) { + ERRP_AUTO_PROPAGATE(); ChardevSpiceChannel *spicevmc =3D backend->u.spicevmc.data; const char *type =3D spicevmc->type; const char **psubtype =3D spice_server_char_device_recognized_subtypes= (); --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946581; cv=none; d=zoho.com; s=zohoarc; b=ikg5Z0Dq63lBRzdkN+mkQd4WdIgOuV47ZtwV3zdGTwF/fS8OhgDvdVIujziPdcezWzk6QtvoC/3/8j+aEpNThPwF1DPgtWmm9Lrs4Mc3c/Nwk2h/k9MAbOn3yqr6Rc7mpNd/fbF5XO5KsEPN3JzIKbUKSNI/XsI6BzhmwwG3CFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946581; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=v5XPl0eZjU8AfInNAh99lqSmHbbfpo5TfJU6Bo7CIaU=; b=QAMMUywSdBnAAL5p0IkRLk2SOg+VZa2oQaSIQtu3JIYc91snN6aQwqtI4P4c4haPFESBDDfdWLWhpNyqDU+mU6N9E8GVlehru40RN07sWCLLlytHu6AjsrH3lsrKUlWnXYyWR49uEnABlpqaCvbmg1qVmoUlmncTtvod6nRNY1Q= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946581571824.2618858871931; Tue, 1 Oct 2019 09:16:21 -0700 (PDT) Received: from localhost ([::1]:44250 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKp1-0006ul-Qq for importer@patchew.org; Tue, 01 Oct 2019 12:16:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50120) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTG-0008LY-CJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTE-0006lH-Is for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38506) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTD-0006bQ-S5 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:48 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT2-0004xb-9a; Tue, 01 Oct 2019 18:53:36 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 25/31] cmdline: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:13 +0300 Message-Id: <20191001155319.8066-26-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- util/qemu-option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index 97172b5eaa..031c01eddc 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -145,6 +145,7 @@ static const QemuOptDesc *find_desc_by_name(const QemuO= ptDesc *desc, void parse_option_size(const char *name, const char *value, uint64_t *ret, Error **errp) { + ERRP_AUTO_PROPAGATE(); uint64_t size; int err; =20 @@ -660,6 +661,7 @@ QemuOpts *qemu_opts_find(QemuOptsList *list, const char= *id) QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id, int fail_if_exists, Error **errp) { + ERRP_AUTO_PROPAGATE(); QemuOpts *opts =3D NULL; =20 if (id) { --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946303; cv=none; d=zoho.com; s=zohoarc; b=DVn8svePQSsS3/d35Zupqjm3+8pyy/xZvd85Y0FvBZit8D6D87arVV2zwhu8HfHo1uay7QlinmtLDt7/L3pThOlxuXIHJ6B1vLVunugbwlOzTivooS3c4UmVwmdE833trR2Snc4fxpuncJLA1wlsMMnmreA6Oqv6Hs17tbNLaXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946303; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TpB/5N6Y0QdcQPqeVQ36mBtZNNQ1BfFx1AMku4Rt8NI=; b=PiwDxx2w3bR4Loibj8aQ7tKRVzE73ngOlIFZsKz4ccnXk/bFzoy7Nb5bpEy3Ds5OEYdYFEkl3Yv4m9mT0Zqs9iiOR4vv+i8ZP+JlrpAepnedk0KbKtw1QhUD2HySub0XN2bCr7sUn90KyCg560OZuP3SG/WBfRXQdXITfj+0CBU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946303809750.4239791485171; Tue, 1 Oct 2019 09:11:43 -0700 (PDT) Received: from localhost ([::1]:44166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKkY-0001ui-0T for importer@patchew.org; Tue, 01 Oct 2019 12:11:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50183) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008NE-6f for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006nq-66 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38510) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006br-FN for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:49 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT2-0004xb-JF; Tue, 01 Oct 2019 18:53:36 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 26/31] QOM: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:14 +0300 Message-Id: <20191001155319.8066-27-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Greg Kurz , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/core/qdev-properties-system.c | 1 + qdev-monitor.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-sys= tem.c index 70bfd4809b..497a568cc2 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -221,6 +221,7 @@ static void get_chr(Object *obj, Visitor *v, const char= *name, void *opaque, static void set_chr(Object *obj, Visitor *v, const char *name, void *opaqu= e, Error **errp) { + ERRP_AUTO_PROPAGATE(); DeviceState *dev =3D DEVICE(obj); Error *local_err =3D NULL; Property *prop =3D opaque; diff --git a/qdev-monitor.c b/qdev-monitor.c index 148df9cacf..89c99d9753 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -328,6 +328,7 @@ static Object *qdev_get_peripheral_anon(void) =20 static void qbus_list_bus(DeviceState *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); BusState *child; const char *sep =3D " "; =20 @@ -342,6 +343,7 @@ static void qbus_list_bus(DeviceState *dev, Error **err= p) =20 static void qbus_list_dev(BusState *bus, Error **errp) { + ERRP_AUTO_PROPAGATE(); BusChild *kid; const char *sep =3D " "; =20 --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569945827; cv=none; d=zoho.com; s=zohoarc; b=jkJ6lstMpHa4A+M5xzmUAM+P+avx+iaEclBcIMR0KqhfbXfNzTdaRmtpQbD+1LRmAidtpz3prp319KNT8Quden3N8q3oXjgVGPode7ODmcuG4nMl6/AvrpRYYWgk/dRt+R11h90IG+WLjejVvjnGVmoQInTE94CA35Ry4TaHJnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569945827; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=nF8nIa5ztE/8Hs2AQe1RqHGNygyqo4y/mvKwG4qqB3Q=; b=VjdQgz4ZRflLmJsbsxjANqdUIaomdR0/TBwyJ9M0ynByF0qPffuSRm8oC9JXCMLYuVFK7t0qXrPekxzZN9Q+Uc2jl7JT6Q16BbmVZIGqNpQr+EV4903BLdP+YV82p4zaADNYLR0a2ILvKFsnqRYlBAiNRSKFMPN34ndeilmKbcY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569945827972890.8685022399981; Tue, 1 Oct 2019 09:03:47 -0700 (PDT) Received: from localhost ([::1]:44058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKcr-0001in-Ki for importer@patchew.org; Tue, 01 Oct 2019 12:03:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50184) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008NF-6d for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006nf-5N for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006cG-Hs for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:49 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT2-0004xb-Qn; Tue, 01 Oct 2019 18:53:36 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 27/31] Migration: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:15 +0300 Message-Id: <20191001155319.8066-28-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 1 + migration/savevm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index 5f7e4d15e9..deaa789533 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -971,6 +971,7 @@ static bool migrate_caps_check(bool *cap_list, MigrationCapabilityStatusList *params, Error **errp) { + ERRP_AUTO_PROPAGATE(); MigrationCapabilityStatusList *cap; bool old_postcopy_cap; MigrationIncomingState *mis =3D migration_incoming_get_current(); diff --git a/migration/savevm.c b/migration/savevm.c index bb9462a54d..f9293fe192 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2586,6 +2586,7 @@ int qemu_load_device_state(QEMUFile *f) =20 int save_snapshot(const char *name, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockDriverState *bs, *bs1; QEMUSnapshotInfo sn1, *sn =3D &sn1, old_sn1, *old_sn =3D &old_sn1; int ret =3D -1; @@ -2790,6 +2791,7 @@ void qmp_xen_load_devices_state(const char *filename,= Error **errp) =20 int load_snapshot(const char *name, Error **errp) { + ERRP_AUTO_PROPAGATE(); BlockDriverState *bs, *bs_vm_state; QEMUSnapshotInfo sn; QEMUFile *f; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946306; cv=none; d=zoho.com; s=zohoarc; b=VTQQdcw9mnalH88MO24k9UCdckuVw+gCi1GSebMRzVb0xrlzOOYrtfDlStJE/KfVLgNb5FBWjOeV3q68r50RMng7QQNPzhHQ7nuzxxNlHCx6/K7qdJM0lvX1XAUA4ukMq8J+PinRGgJBjQAX1JHTSFoK5LKIMqKEAk2y6nTofms= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946306; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=IKW4knnHFvyild5z/vYEuYkbzW7v1y5bgO/8fCXSGWQ=; b=T3uuE8z4udtmRXzw45+2yCDanSsIknal7d6mG2I1UBxfq5Cbt77R7OjB7TOCZKUY2OCgB/okne2D2PZgTs3iJVVlAVg+7AsNmauFkPXyK2viAD4lx2vXmDBAFq4X5W2MOXeUOj+CeH1fQnFL4+trd4ZJEwA6DXaKynBr6TonY8E= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946306672696.6799202720741; Tue, 1 Oct 2019 09:11:46 -0700 (PDT) Received: from localhost ([::1]:44168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKka-0001yr-1T for importer@patchew.org; Tue, 01 Oct 2019 12:11:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50181) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008N9-4u for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006nm-96 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTE-0006cK-Jb for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:49 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT3-0004xb-13; Tue, 01 Oct 2019 18:53:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 28/31] Sockets: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:16 +0300 Message-Id: <20191001155319.8066-29-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Greg Kurz , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- util/qemu-sockets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index bcc06d0e01..396e028ae0 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -861,6 +861,7 @@ static int unix_listen_saddr(UnixSocketAddress *saddr, int num, Error **errp) { + ERRP_AUTO_PROPAGATE(); struct sockaddr_un un; int sock, fd; char *pathbuf =3D NULL; @@ -936,6 +937,7 @@ err: =20 static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp) { + ERRP_AUTO_PROPAGATE(); struct sockaddr_un un; int sock, rc; size_t pathlen; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569948047; cv=none; d=zoho.com; s=zohoarc; b=Q19Nc1l3HhL1QRPvCP8FlkjzLMQiKCD4dnVwGNc917sxqTbqIH0e1mCMRxJ0h6SEY+bLa91ffsaIFpuA+NlTuuUMopso2L2lyba3eJ5Ul+P7FtTPr8wAIERjFsoGLvg6LZMMNycLFImHgKBJtsvlPOfsOAQCnZ0D9yBTRSZFttw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569948047; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OydzvOWrlUHZdWgXVdlMUhqLsZqr9dj+iEp+MG98YQA=; b=lWigmIaLG+rsDsfdJiFqP1MJlnkafRefemcRv3029C4jgtdPrl4EhgQdK0OsK/HyOzm63GTIiYI2kkOBCRJ3uVqSau/5Kl/S0eay2D0A1vWoQG6OchMLEwXk8bcWADz8YiAWUmxsc3iRzHEdXME2OI4P2BzT4fnyjFvmB8GcM30= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569948047398315.23140417052707; Tue, 1 Oct 2019 09:40:47 -0700 (PDT) Received: from localhost ([::1]:44694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFLCf-00050m-Nn for importer@patchew.org; Tue, 01 Oct 2019 12:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50287) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTQ-00005j-Gq for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTP-0006ue-9M for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:54:00 -0400 Received: from relay.sw.ru ([185.231.240.75]:38536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTP-0006cf-1i; Tue, 01 Oct 2019 11:53:59 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT3-0004xb-5m; Tue, 01 Oct 2019 18:53:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 29/31] nbd: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:17 +0300 Message-Id: <20191001155319.8066-30-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , qemu-block@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/client.c | 5 +++++ nbd/server.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/nbd/client.c b/nbd/client.c index f6733962b4..6e510f4a14 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -68,6 +68,7 @@ static int nbd_send_option_request(QIOChannel *ioc, uint3= 2_t opt, uint32_t len, const char *data, Error **errp) { + ERRP_AUTO_PROPAGATE(); NBDOption req; QEMU_BUILD_BUG_ON(sizeof(req) !=3D 16); =20 @@ -153,6 +154,7 @@ static int nbd_receive_option_reply(QIOChannel *ioc, ui= nt32_t opt, static int nbd_handle_reply_err(QIOChannel *ioc, NBDOptionReply *reply, bool strict, Error **errp) { + ERRP_AUTO_PROPAGATE(); g_autofree char *msg =3D NULL; =20 if (!(reply->type & (1 << 31))) { @@ -331,6 +333,7 @@ static int nbd_receive_list(QIOChannel *ioc, char **nam= e, char **description, static int nbd_opt_info_or_go(QIOChannel *ioc, uint32_t opt, NBDExportInfo *info, Error **errp) { + ERRP_AUTO_PROPAGATE(); NBDOptionReply reply; uint32_t len =3D strlen(info->name); uint16_t type; @@ -870,6 +873,7 @@ static int nbd_start_negotiate(AioContext *aio_context,= QIOChannel *ioc, bool structured_reply, bool *zeroes, Error **errp) { + ERRP_AUTO_PROPAGATE(); uint64_t magic; =20 trace_nbd_start_negotiate(tlscreds, hostname ? hostname : ""); @@ -1005,6 +1009,7 @@ int nbd_receive_negotiate(AioContext *aio_context, QI= OChannel *ioc, const char *hostname, QIOChannel **outioc, NBDExportInfo *info, Error **errp) { + ERRP_AUTO_PROPAGATE(); int result; bool zeroes; bool base_allocation =3D info->base_allocation; diff --git a/nbd/server.c b/nbd/server.c index d8d1e62455..e7eb154f53 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -365,6 +365,7 @@ static int nbd_opt_read_name(NBDClient *client, char *n= ame, uint32_t *length, static int nbd_negotiate_send_rep_list(NBDClient *client, NBDExport *exp, Error **errp) { + ERRP_AUTO_PROPAGATE(); size_t name_len, desc_len; uint32_t len; const char *name =3D exp->name ? exp->name : ""; @@ -427,6 +428,7 @@ static void nbd_check_meta_export(NBDClient *client) static int nbd_negotiate_handle_export_name(NBDClient *client, bool no_zer= oes, Error **errp) { + ERRP_AUTO_PROPAGATE(); char name[NBD_MAX_NAME_SIZE + 1]; char buf[NBD_REPLY_EXPORT_NAME_SIZE] =3D ""; size_t len; @@ -1260,6 +1262,7 @@ static int nbd_negotiate_options(NBDClient *client, E= rror **errp) */ static coroutine_fn int nbd_negotiate(NBDClient *client, Error **errp) { + ERRP_AUTO_PROPAGATE(); char buf[NBD_OLDSTYLE_NEGOTIATE_SIZE] =3D ""; int ret; =20 @@ -1631,6 +1634,7 @@ void nbd_export_close(NBDExport *exp) =20 void nbd_export_remove(NBDExport *exp, NbdServerRemoveMode mode, Error **e= rrp) { + ERRP_AUTO_PROPAGATE(); if (mode =3D=3D NBD_SERVER_REMOVE_MODE_HARD || QTAILQ_EMPTY(&exp->clie= nts)) { nbd_export_close(exp); return; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946049; cv=none; d=zoho.com; s=zohoarc; b=fDkVWHMtjgkoOh0RwjBG/J25CqJgu9Sl+vFxD/0w5ynm1oiY2SDoLQKzMp9b7JsFf7SdQLp0dukqVOO6SPEUqb0nX/cpqGnZFY8ox2qyWvQPogCR7da/6ruS/y3Vixm5GGJpwwoYuCoplv6laiueKMXdwSSvJoIR4bUAp1zxBE8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946049; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=WBp82kbDtzuX4urJ1IuxJFVdYubdHFuhT5+8Ehb2pFg=; b=Dwbz0gXAh5bEgc9oRwxmDedL7GO69Z3uUHB+1ki4z4KDipOUkQJ1SsbmSmJtO9cln2DJ1sCNT0GQig7qp+IAM0mKnycqdpQW3VQotvh/GI4A4SsbnGEF+OX7feisg572sClrpcGxw6cK8DK+KC1n0on3e0EbzSg+KI4KJ6TyZPA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946049964702.7538012883731; Tue, 1 Oct 2019 09:07:29 -0700 (PDT) Received: from localhost ([::1]:44110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKgQ-0005fL-HZ for importer@patchew.org; Tue, 01 Oct 2019 12:07:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50186) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008NK-6t for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006oH-Ae for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38540) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTF-0006dP-36 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT3-0004xb-Cj; Tue, 01 Oct 2019 18:53:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 30/31] PVRDMA: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:18 +0300 Message-Id: <20191001155319.8066-31-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz , Yuval Shaia Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/rdma/vmw/pvrdma_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 3e36e13013..fd1a6ef099 100644 --- a/hw/rdma/vmw/pvrdma_main.c +++ b/hw/rdma/vmw/pvrdma_main.c @@ -592,6 +592,7 @@ static void pvrdma_shutdown_notifier(Notifier *n, void = *opaque) =20 static void pvrdma_realize(PCIDevice *pdev, Error **errp) { + ERRP_AUTO_PROPAGATE(); int rc =3D 0; PVRDMADev *dev =3D PVRDMA_DEV(pdev); Object *memdev_root; --=20 2.21.0 From nobody Tue Apr 30 07:43:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1569946511; cv=none; d=zoho.com; s=zohoarc; b=V2N6F+byYOFSMyUw2twjbWV9ldAF6obBPev7eWXHK4/qf5Nx9eGndguCHz6YUt1q42DZgCNRQQd8acz82urea96763vK/GjSISEvBkGHyEala3lvzs/vQPxgtaKHgefrjc9hUcYUa+sRRe3mcu5LDMPzoIOhF+1MdBrTUKAyyDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569946511; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=j3K9p8H2BFOhA5ElEGELXEKk/odeFV6ZZ8GZcLddTBg=; b=Bsvhn+tgVE4lVQj9AkjyJHwkVhOK9ws47rk0c/2naQT6FcD/y2wq6jqxQcX6qvYV1NaGKZhN/+ivjySxkSTXHOxiJxadDkNqz9G0HyrOKO2vUvqW3w5PS0a1BI2YhZ/LgFYudgwlEhKBxPiYGkUT+7oXthPEYf6/dZ1XCxdGC04= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569946511010259.3984262382211; Tue, 1 Oct 2019 09:15:11 -0700 (PDT) Received: from localhost ([::1]:44238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKnl-0005um-8K for importer@patchew.org; Tue, 01 Oct 2019 12:15:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50182) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFKTJ-0008NC-6Q for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFKTG-0006oX-Dm for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:52 -0400 Received: from relay.sw.ru ([185.231.240.75]:38550) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFKTG-0006dg-31 for qemu-devel@nongnu.org; Tue, 01 Oct 2019 11:53:50 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.2) (envelope-from ) id 1iFKT3-0004xb-OO; Tue, 01 Oct 2019 18:53:37 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v4 31/31] ivshmem: Fix error_append_hint/error_prepend usage Date: Tue, 1 Oct 2019 18:53:19 +0300 Message-Id: <20191001155319.8066-32-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001155319.8066-1-vsementsov@virtuozzo.com> References: <20191001155319.8066-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 185.231.240.75 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 =3D=3D &fatal_err (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_\(append_hint\|prepend\)(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error-add-info.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) and then by hand, for not maintained changed files: git commit -m ": $(< auto-msg)" Still, for backporting it may be more comfortable to use only the first command and then do one huge commit. Reported-by: Greg Kurz Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 5e3b05eae0..b6dcc27d18 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -864,6 +864,7 @@ static void ivshmem_write_config(PCIDevice *pdev, uint3= 2_t address, =20 static void ivshmem_common_realize(PCIDevice *dev, Error **errp) { + ERRP_AUTO_PROPAGATE(); IVShmemState *s =3D IVSHMEM_COMMON(dev); Error *err =3D NULL; uint8_t *pci_conf; --=20 2.21.0