From nobody Tue May 7 19:43:17 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=1569355916; cv=none; d=zoho.com; s=zohoarc; b=A6VdZwQEAjck43PEAP/0F0sRZwjJl2tOVFSjNo7YTALB1faqz7GSyk1izlFvlVuKoLr5YXMjxzK/HS09pMWc+SnlfggX4wBEg9p1/TKUn1lKC/4I5UvLK346wi0XUc//bVnhZ2EqLpcnlRci7oEJ4eh8L/AkXO+OLefSrhkhUSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569355916; 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=ki6Mq0azmHOtL8nyvy+RsNkOtlsgjJMbei52u7OJQg0UVDfFqHprtT9hYi4FOs/N+W3rLf+qtQuhUlHN4/VhmCDG7QM6++BtZhp6IJQeTEvnLbx0TP1LeGAJQtB7LFSZUMMFk0Zc97H2C6/OoU+UrAFtKlIYdv+ndaUsYX5Bq5U= 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 1569355916082173.67440198953273; Tue, 24 Sep 2019 13:11:56 -0700 (PDT) Received: from localhost ([::1]:50592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrA3-0002Yd-V4 for importer@patchew.org; Tue, 24 Sep 2019 16:11:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43640) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr84-0000Mb-1c for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr82-0002oO-AE for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:43 -0400 Received: from relay.sw.ru ([185.231.240.75]:38016) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr82-0002nL-3F for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:42 -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 1iCr7z-0001Mk-Pq; Tue, 24 Sep 2019 23:09:39 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 01/25] errp: rename errp to errp_in where it is IN-argument Date: Tue, 24 Sep 2019 23:08:38 +0300 Message-Id: <20190924200902.4703-2-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 May 7 19:43:17 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=1569355917; cv=none; d=zoho.com; s=zohoarc; b=O/PoUZaNRfR4zd1Q2nGsLYURQEE4Dy/2+EqwC0Omfrkq5pj83X+iPuMROkt80p2Y+hVos4obJ42Kzp8NgQGUECDOwaZTA2JvyKCH+b2JjXetvnlfZQvSSvlKDYEyBqmicOIH/Un7wsUaRrWtH08DZtf8RwHrYFMDQ6bltUOoJXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569355917; 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=vy/XsB3VxPKvXBU4ly5jZ6p3I1me4b6Y7QmmSd+w9GU=; b=aMPykZwbHR/KQLF1SBqD6wCZq9o5K227O0qr8Mw5qmAlXFhkwuOdisxJDDs2xK5YpT3NmkR+JqDsp2dBA5bU6YLjv9LnLf/1JnSiyjUt8OHp7L7KhxK3LunWTgyF3aqWS4A5GEm4dRvugoxDhSvFtXfd/CRGhs/FWrvnr+vNcNE= 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 1569355916797290.71828195190585; Tue, 24 Sep 2019 13:11:56 -0700 (PDT) Received: from localhost ([::1]:50594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrA8-0002h1-Dh for importer@patchew.org; Tue, 24 Sep 2019 16:11:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43681) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr87-0000Rt-B0 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr86-0002qA-DO for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:47 -0400 Received: from relay.sw.ru ([185.231.240.75]:38030) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr86-0002pf-5e for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:46 -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 1iCr84-0001Mk-K6; Tue, 24 Sep 2019 23:09:44 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 02/25] hw/core/loader-fit: fix freeing errp in fit_load_fdt Date: Tue, 24 Sep 2019 23:08:39 +0300 Message-Id: <20190924200902.4703-3-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com 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 zero errp. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- hw/core/loader-fit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 953b16bc82..11e4fad595 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -201,6 +201,7 @@ static int fit_load_fdt(const struct fit_loader *ldr, c= onst void *itb, if (err =3D=3D -ENOENT) { load_addr =3D ROUND_UP(kernel_end, 64 * KiB) + (10 * MiB); 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 May 7 19:43:17 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=1569356114; cv=none; d=zoho.com; s=zohoarc; b=VSPtNzsQxltEpDNktAiS91lBIzEP7HoGeBfgwGsv9iZ9BRxaVj9savMyV5KRGN/wvoJwyaUE2H2VGAxN1V5K5C5oypD45GSDP22QA5FKfnh3ZtgM/ZFRtEX7MIKsoF6Pr/PI+qNeS/15At2Ti81IKAZ8ovYI4BPzOfJ7sLa3nqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356114; 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=PlKZaTtn6QocTrEJbwVoHanT0SQSCakjbvFYVulDCVY=; b=dfqHXXeAzSU6ju2Yk74qs76pHSj7Ic1bJ6+NebJwbgi5aEwk2pdBa/Ivnfldz3JR24HGZnA+cEAvE7kg8C3My59ufaen0TKBK1edbvin+NUobgTddF5KjdtjxwhSsCZoBDZu8OSz8ExnuXRuLm7RFHJ+Uqxib8cO6i2XtS2W/9A= 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 1569356114495988.0223723866625; Tue, 24 Sep 2019 13:15:14 -0700 (PDT) Received: from localhost ([::1]:50620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrDM-0006cL-KV for importer@patchew.org; Tue, 24 Sep 2019 16:15:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43701) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr89-0000Uj-7c for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr88-0002rH-3F for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:49 -0400 Received: from relay.sw.ru ([185.231.240.75]:38038) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr87-0002qf-SB for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09: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 1iCr86-0001Mk-Fg; Tue, 24 Sep 2019 23:09:46 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 03/25] net/net: fix local variable shadowing in net_client_init Date: Tue, 24 Sep 2019 23:08:40 +0300 Message-Id: <20190924200902.4703-4-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com 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 May 7 19:43:17 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=1569356122; cv=none; d=zoho.com; s=zohoarc; b=cY3NMK1VT0vMgEZoNiJ0FxEYNHwdWuauFEHy+A/trSScCQASpu2M5IlnvFyfqQu297xUgfh/uuXUGB/PGqnGtZ7zFrNKL9WCkarHgbPc2x9rbmdWRhRrIvC7+bkRIdGNNujBC2YY8Iwe2sSyQlgilsmYYYkAvg93H4EP7TGASYI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356122; h=Content-Type: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=0DDkKryWT5zHfOjjqi1h9tDcxvEBQFi3uITvSx28/HA=; b=dMisJTsGgf7GQIAUB2JYMpxiSUrYegUDgA/dwjQFJhL8M9Kzfkid97r6/W2MfZYV1YysXZBWy05bLcOQcTGqvyh7KDS0jj1cZTYPWV4udk03Y63ADTlu1LG5EO8XriKkXROcv3oxG8HjZMq2MS1kGxSWaA2YMYSyg1k26EgbwWk= 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 1569356122142763.0352770790156; Tue, 24 Sep 2019 13:15:22 -0700 (PDT) Received: from localhost ([::1]:50622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrDP-0006fY-01 for importer@patchew.org; Tue, 24 Sep 2019 16:15:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8B-0000XG-0L for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr89-0002ru-0V for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38042) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr88-0002qu-Nm; Tue, 24 Sep 2019 16:09: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 1iCr86-0001Mk-Qn; Tue, 24 Sep 2019 23:09:46 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 04/25] error: auto propagated local_err Date: Tue, 24 Sep 2019 23:08:41 +0300 Message-Id: <20190924200902.4703-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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 , Paul Burton , Peter Maydell , Jeff Cody , Jason Wang , Mark Cave-Ayland , Michael Roth , Gerd Hoffmann , Subbaraya Sundeep , qemu-block@nongnu.org, Juan Quintela , Aleksandar Rikalo , "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , David Gibson , Eric Farman , Eduardo Habkost , Greg Kurz , Yuval Shaia , "Dr. David Alan Gilbert" , Alex Williamson , integration@gluster.org, David Hildenbrand , John Snow , Richard Henderson , Kevin Wolf , vsementsov@virtuozzo.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Max Reitz , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of functions with errp parameter. It has three goals: 1. Fix issue with error_fatal & error_append_hint: user can't see these hints, because exit() happens in error_setg earlier than hint is appended. [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: John Snow CC: Kevin Wolf CC: Max Reitz CC: Fam Zheng CC: Jeff Cody CC: "Marc-Andr=C3=A9 Lureau" CC: Paolo Bonzini CC: Greg Kurz CC: Subbaraya Sundeep CC: Peter Maydell CC: Paul Burton CC: Aleksandar Rikalo CC: "Michael S. Tsirkin" CC: Marcel Apfelbaum CC: Mark Cave-Ayland CC: David Gibson CC: Yuval Shaia CC: Cornelia Huck CC: Eric Farman CC: Richard Henderson CC: David Hildenbrand CC: Halil Pasic CC: Christian Borntraeger CC: Gerd Hoffmann CC: Alex Williamson CC: Markus Armbruster CC: Michael Roth CC: Juan Quintela CC: "Dr. David Alan Gilbert" CC: Eric Blake CC: Jason Wang CC: "Daniel P. Berrang=C3=A9" CC: Eduardo Habkost CC: qemu-block@nongnu.org CC: qemu-devel@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 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/qapi/error.h b/include/qapi/error.h index 9376f59c35..fb41f7a790 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -322,6 +322,41 @@ 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_FUNCTION_BEGIN + * + * This macro is created to be the first line of a function with Error **e= rrp + * parameter. + * + * 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_FUNCTION_BEGIN() \ +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 May 7 19:43:17 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=1569355939; cv=none; d=zoho.com; s=zohoarc; b=GM7uHVGrpwOqgk3jK7erD7Bx5ItiPf7lDy0oNpdBUOJdbtwVs76N0X5NOCOJFkJ3k8PA6Q8acntMxBWsagieMyP8s8ZK5AnEyYpbEjNxoaqbSPVTfmLiUvAklSjumibhQZjBsbseXjGu6LNnlrS7KKqy7uKje1WyhoikhgFOcF4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569355939; h=Content-Type: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=jYMiNK9D9StbbW1X0JkbunQPse+ubAiAYatE++JxwzI=; b=Ym9Jv5778S3Twse0qIkMrBXULQvL8Om2etZWeZi9Ntj9tRfG1Nq38gohmxeSPSzVND5KvLYmQ7qB8NByhzTpIlRc6Kr9wA9atdFX3Sx7C7OdPt+7ykzyWKAnWqedaHwiPkiV1m3zvR5Sg6ktI9ek6hSpRojDij/cNBJ6RTy2lCY= 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 1569355939305797.3609817596466; Tue, 24 Sep 2019 13:12:19 -0700 (PDT) Received: from localhost ([::1]:50598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrAX-0003Km-Gi for importer@patchew.org; Tue, 24 Sep 2019 16:12:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43734) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8A-0000Wb-JM for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr88-0002rl-TU for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38048) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr88-0002r3-Km; Tue, 24 Sep 2019 16:09: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 1iCr87-0001Mk-7T; Tue, 24 Sep 2019 23:09:47 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 05/25] scripts: add coccinelle script to fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:42 +0300 Message-Id: <20190924200902.4703-6-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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 , Paul Burton , Peter Maydell , Jeff Cody , Jason Wang , Mark Cave-Ayland , Michael Roth , Gerd Hoffmann , Subbaraya Sundeep , qemu-block@nongnu.org, Juan Quintela , Aleksandar Rikalo , "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , David Gibson , Eric Farman , Eduardo Habkost , Greg Kurz , Yuval Shaia , "Dr. David Alan Gilbert" , Alex Williamson , integration@gluster.org, David Hildenbrand , John Snow , Richard Henderson , Kevin Wolf , vsementsov@virtuozzo.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Max Reitz , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" error_append_hint will not work, if errp =3D=3D &fatal_error, as program will exit before error_append_hint call. Fix this by use of special macro ERRP_FUNCTION_BEGIN. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- CC: John Snow CC: Kevin Wolf CC: Max Reitz CC: Fam Zheng CC: Jeff Cody CC: "Marc-Andr=C3=A9 Lureau" CC: Paolo Bonzini CC: Greg Kurz CC: Subbaraya Sundeep CC: Peter Maydell CC: Paul Burton CC: Aleksandar Rikalo CC: "Michael S. Tsirkin" CC: Marcel Apfelbaum CC: Mark Cave-Ayland CC: David Gibson CC: Yuval Shaia CC: Cornelia Huck CC: Eric Farman CC: Richard Henderson CC: David Hildenbrand CC: Halil Pasic CC: Christian Borntraeger CC: Gerd Hoffmann CC: Alex Williamson CC: Markus Armbruster CC: Michael Roth CC: Juan Quintela CC: "Dr. David Alan Gilbert" CC: Eric Blake CC: Jason Wang CC: "Daniel P. Berrang=C3=A9" CC: Eduardo Habkost CC: qemu-block@nongnu.org CC: qemu-devel@nongnu.org CC: integration@gluster.org CC: qemu-arm@nongnu.org CC: qemu-ppc@nongnu.org CC: qemu-s390x@nongnu.org .../fix-error_append_hint-usage.cocci | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 scripts/coccinelle/fix-error_append_hint-usage.cocci diff --git a/scripts/coccinelle/fix-error_append_hint-usage.cocci b/scripts= /coccinelle/fix-error_append_hint-usage.cocci new file mode 100644 index 0000000000..327fe6098c --- /dev/null +++ b/scripts/coccinelle/fix-error_append_hint-usage.cocci @@ -0,0 +1,25 @@ +@rule0@ +// Add invocation to errp-functions +identifier fn; +@@ + + fn(..., Error **errp, ...) + { ++ ERRP_FUNCTION_BEGIN(); + <+... + error_append_hint(errp, ...); + ...+> + } + +@@ +// Drop doubled invocation +identifier rule0.fn; +@@ + + fn(...) +{ + ERRP_FUNCTION_BEGIN(); +- ERRP_FUNCTION_BEGIN(); + ... +} + --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356381; cv=none; d=zoho.com; s=zohoarc; b=A0rD5lj0reGfi2YNPBKZKSeOBIL9Qy6lOLAuNyqCtd8AWx6AACSBXz3fRFIVStzifskeWqtbhC++i7FG5Ru+4yFt9ZH3z95n/c6SrD34XV5QGGIbD78ZD2nOC26RF07cqth6kFxFu/Uo2x16HX1cpm1ctvN8g3usbHyGBOAuTtk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356381; 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=yUErLf8B5qY5csfpgcpx4MCd0p2KikWXTm+WYOa8vYI=; b=n2IWPRRf4REaOizXVKZUZIDldudwboKtNaTnOJ2+KtQ7ecybdmNiskliiBMrV5VdsqakR3IB1FV6rRDPVglgZXDcW9iDgtsYXeB5EFPCYbVki20w/oTaty0R0hnRbHapD2dRMevbyjRVRPP5qgFJ1k3abYuuKEoLlfEQJBl0gak= 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 1569356381843813.0263641027163; Tue, 24 Sep 2019 13:19:41 -0700 (PDT) Received: from localhost ([::1]:50654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrHb-0002XI-0l for importer@patchew.org; Tue, 24 Sep 2019 16:19:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43739) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8A-0000X6-Vn for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr89-0002s1-3M for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38052) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr88-0002r6-PV for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09: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 1iCr87-0001Mk-G8; Tue, 24 Sep 2019 23:09:47 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 06/25] python: add commit-per-subsystem.py Date: Tue, 24 Sep 2019 23:08:43 +0300 Message-Id: <20190924200902.4703-7-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.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 --- 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 May 7 19:43:17 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=1569356147; cv=none; d=zoho.com; s=zohoarc; b=OSaOCBbqhyDpLO0Clg9iOW3Bmqe2jRPYX/x5U/se1aAvYcJQbocU145oQQPhmb9XK+8lPpCpPO4daRoy+WHEr0eA5tEuABzaE//03tc+r4/jcHeY+ESw5vkN0ow0ID4yWgJEQeRQGm9qJszEhC7QcHMbn4jHaWI1KPwDQM3X8Y8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356147; 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=Lts9eTeJBsDOQWSIB4J6pSUjUGGeVmA8U6+ZngnNOPw=; b=UZIRjlZJgmy9/sZatmhrn+XDxxGKfRN86hJjpcIJM+J+pyFTQnj45iHHDy21PAWb+OkyY9zm0Fuw4MEYWZwTwyZc0idZbmZOermpfYOAbVKKLugEjLK76WSCv7sTXuhROl++MARgkb0Rom+563SFyZFvLGDOzIrNhGmiOWB3FTw= 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 1569356147033219.90706431823867; Tue, 24 Sep 2019 13:15:47 -0700 (PDT) Received: from localhost ([::1]:50624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrDt-0007Rh-Gj for importer@patchew.org; Tue, 24 Sep 2019 16:15:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43740) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8A-0000XB-VE for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr89-0002sN-Cy for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr89-0002rL-26; Tue, 24 Sep 2019 16:09: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 1iCr87-0001Mk-Mr; Tue, 24 Sep 2019 23:09:47 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 07/25] s390: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:44 +0300 Message-Id: <20190924200902.4703-8-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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/s390x/s390-ccw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index 0c5a5b60bd..c445dca2e1 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_FUNCTION_BEGIN(); unsigned int cssid, ssid, devid; char dev_path[PATH_MAX] =3D {0}, *tmp; =20 --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356398; cv=none; d=zoho.com; s=zohoarc; b=Gj0it4v6/tAlY8/PxKJ2mC1lkvmoqjTBUPtSAJJ13X/+nR7vl98Cl560ustP9MeFQv47/hYcijA9UrnJI25E9vI/pWRf41Xsz6eEdicuskUotUJ3JdFn0slpHVqOSL03YTjm0jgZgzzcaQQskYK/5WKfNND7zMGI+PwiDA8aK2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356398; 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=GesJ1A3laJLB/rELlHIFbZOxojXT+rkL2jCmzpqEKxs=; b=JnzfWdGP+RTRsZ223oI+3V54GiGLm27d8VXDXsPr5HRdvYwvuTmr7Su/3FJ9NsGHYn8cL7yfIwKBcDWs2X6Uy/EU2CaHEMQ6vu4iP8w0t6x4HzTaA3UAqv81uMP3hTijZFMWJeFVWWU3SNMemfV8O8OfYZ7n91L12w5CuR9eKEE= 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 1569356398141655.8077817504053; Tue, 24 Sep 2019 13:19:58 -0700 (PDT) Received: from localhost ([::1]:50664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrHw-0002we-4i for importer@patchew.org; Tue, 24 Sep 2019 16:19:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43744) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8B-0000XH-0R for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr89-0002sT-Eq for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:50 -0400 Received: from relay.sw.ru ([185.231.240.75]:38058) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr89-0002rN-3b; Tue, 24 Sep 2019 16:09: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 1iCr87-0001Mk-TL; Tue, 24 Sep 2019 23:09:47 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 08/25] ARM TCG CPUs: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:45 +0300 Message-Id: <20190924200902.4703-9-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..21e4bdfb72 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_FUNCTION_BEGIN(); 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..e79a46b0b3 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); VirtMachineState *vms =3D VIRT_MACHINE(obj); =20 if (!strcmp(value, "smmuv3")) { --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356207; cv=none; d=zoho.com; s=zohoarc; b=PlaXUB7VF+1YiSoAT9zh8s3TbIy/4UUGgdfxuuaZO5JOsvuLz9DyW51azYue33fR3edk7YSwEi7PGz5vdTLTtZZcda6V8obWiLtf/siACdOICKc0BCruE0BBPRGij9jsigxJMC0I2M79fpG8Y7iH7AFneZ/l1eslh5WWglNwEiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356207; 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=ytnkSQO8ZIr+NZ4+94HZwXA6XQO8xEYFWp5l+klu6xA=; b=mdeNIAyH9QDTEzvdf+FAnk6/ngjmbi+X0vc4EZ8i19b0Xp5IU4BKnBV9iMQbV0U3uMzfUTadXFLEhWMeKhSAWr2ARtst79tnUpcE0U4MBzXe6TwKg5D1bs4wpvzm8BmYM65VO4blj7JGIMrXlFg1H6flMCa8OGSqwGFwTyUX3PM= 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 1569356207465660.9141389280788; Tue, 24 Sep 2019 13:16:47 -0700 (PDT) Received: from localhost ([::1]:50632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrEr-0008WP-II for importer@patchew.org; Tue, 24 Sep 2019 16:16:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43764) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8C-0000Z2-BI for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8A-0002t3-9A for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:51 -0400 Received: from relay.sw.ru ([185.231.240.75]:38064) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr89-0002rW-Gx; Tue, 24 Sep 2019 16:09: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 1iCr88-0001Mk-1Q; Tue, 24 Sep 2019 23:09:48 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 09/25] PowerPC TCG CPUs: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:46 +0300 Message-Id: <20190924200902.4703-10-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: qemu-ppc@nongnu.org, vsementsov@virtuozzo.com, Mark Cave-Ayland , 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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/spapr.c | 1 + hw/ppc/spapr_pci.c | 1 + target/ppc/kvm.c | 2 ++ 4 files changed, 5 insertions(+) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index c5bbcc7433..939fdd258f 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_FUNCTION_BEGIN(); Core99MachineState *cms =3D CORE99_MACHINE(obj); =20 if (!strcmp(value, "cuda")) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 08a2a5a770..d0dd8aaa22 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_FUNCTION_BEGIN(); SpaprMachineState *spapr =3D SPAPR_MACHINE(qdev_get_machine()); MachineState *ms =3D MACHINE(spapr); int vcpu_id; diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 7b71ad7c74..172d6689d0 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_FUNCTION_BEGIN(); /* 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..aacfe194e2 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); int i; GString *g; char *s; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356579; cv=none; d=zoho.com; s=zohoarc; b=Qsqaq7pJqW/J/nfMzm0gt2r9q3pk/uKuF5x+6pLMdGp2JIDSGaYQ068tIXNDnb4rk86/H+iLUsENG15hKfLi6zJ9jUWaRcU0RrSOGOkPonPU3hfitfElx/LOmXt/TNiqEminjzQxYYYH/yFtQ/i1vNPCxtYCgWquK36hohDAZaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356579; 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=k8GFrrjbVkHKVZH32INLmIGqdgT8oQ+MJRfAi9S1Gg0=; b=NGTovEyEPl/zMelxQYgxisrIFjGPZ3C0wxm+Uw3x9E4099FtZY5l+DBL+d+NqDO6sFKpJ6uErPRch5yL2DHimoQtfRbN+MOXUQpv/xBixCISpHJNGbJyB6yK75cnaCBN+titdy1kThgbRGgLogNtmhfQPEZ9bndYmy2brCfHfTs= 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 15693565794265.85015333800709; Tue, 24 Sep 2019 13:22:59 -0700 (PDT) Received: from localhost ([::1]:50700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrKr-0006k9-JI for importer@patchew.org; Tue, 24 Sep 2019 16:22:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43757) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8B-0000YL-Ke for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr89-0002sl-W1 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:09:51 -0400 Received: from relay.sw.ru ([185.231.240.75]:38068) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr89-0002rd-Nn; Tue, 24 Sep 2019 16:09: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 1iCr88-0001Mk-Aq; Tue, 24 Sep 2019 23:09:48 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 10/25] arm: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:47 +0300 Message-Id: <20190924200902.4703-11-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..42487fc62b 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_FUNCTION_BEGIN(); 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 May 7 19:43:17 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=1569356916; cv=none; d=zoho.com; s=zohoarc; b=YA1cJQuzQFbiKKnFg53u0SJZbMYa2hO7rUkfI45zB81mRaaRP2unpKu4ARQ+Zbi00cdvRpb1VrIzXdTigNd7Q+sEhaR6DuyfQhb9lcezrzdOwwVv3Hs2uOXXhwMkTIraqQTIl0OHYObye5qSYmCcJhXmziG8V0pMj06XwyzFv4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356916; 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=N2HTuW8IMBElPZQuqYEvcbM7WDnYnfws1JgnEVRfz3o=; b=m48H89FzeXGyTf0ymWsWpu50yCCpIb5sTkxxRmTUJ3aPZcKIt1VcWSDBka730oQmqv2GwLMkeWFy3YE63PHhcz75hWAT43a3/RMVSLUqUCwx+kyZj96bVV0fptsSo2pp2CimIQud4iYOHMbeUfggG5fDhki4GveOEy4tuBaBVJg= 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 1569356916766936.4962201842964; Tue, 24 Sep 2019 13:28:36 -0700 (PDT) Received: from localhost ([::1]:50756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrQH-0004gA-VC for importer@patchew.org; Tue, 24 Sep 2019 16:28:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43963) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8L-0000ox-OC for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8K-0002zJ-Aj for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -0400 Received: from relay.sw.ru ([185.231.240.75]:38076) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8K-0002s8-3K for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:00 -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 1iCr88-0001Mk-Hi; Tue, 24 Sep 2019 23:09:48 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 11/25] SmartFusion2: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:48 +0300 Message-Id: <20190924200902.4703-12-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..a2f5310fe0 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_FUNCTION_BEGIN(); MSF2SysregState *s =3D MSF2_SYSREG(dev); =20 if ((s->apb0div > 32 || !is_power_of_2(s->apb0div)) --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356382; cv=none; d=zoho.com; s=zohoarc; b=kqiP1LxGW+F+tZs/mxLi8oAMJq27p7wm+cuk76vRNuxXQFBnNc5XUZ43MdpXQDUTrk000UiI4bVAoXt/JA+iviQMXtodJjH8ob5NSopLaHAgVppr0ki6NNZBBk3LYLfIxmybdj9KWi2ANFFTarzBgOorGPba/ypqwUDjbLyNc7Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356382; 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=4t+3f+yMg6u6AWtAmNGwVMv8Sn47PBMZRRPsODQf4bY=; b=Cjng1oK6LtuB16yFDeU4ZotDgrpn3fMU/t7JhNXQ9b9PoyqQsb4UrmIifgekBTrUv7AUpZO5q16tJLdtv/JqWcGQkpYvn7BIXCyfqXVAvH79LfP6hU1mKo5XBMf6N/9z8IFhb4IamVmOIO46TawcLHUaYFjYY6c/xnGk9l7GTUQ= 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 1569356382002252.47714697676201; Tue, 24 Sep 2019 13:19:42 -0700 (PDT) Received: from localhost ([::1]:50656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrHc-0002Xg-Ob for importer@patchew.org; Tue, 24 Sep 2019 16:19:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8M-0000pP-0d for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8K-0002zW-Km for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -0400 Received: from relay.sw.ru ([185.231.240.75]:38088) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8K-0002sZ-BP for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:00 -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 1iCr88-0001Mk-Th; Tue, 24 Sep 2019 23:09:49 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 12/25] PCI: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:49 +0300 Message-Id: <20190924200902.4703-13-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..a0aacad711 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_FUNCTION_BEGIN(); 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 May 7 19:43:17 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=1569357181; cv=none; d=zoho.com; s=zohoarc; b=exECYVKDKYL0RVGyNwJ4f9B+wz7RwTeHLaGmv8bvbIM2l1RPUi2ntpaIXkLn4n2tFoc6SalhYdS3apY67YPtRxgpLd+R99WzbGp2X9YSl84VMoBJfvVPjK3PLhRi1g2+ZubRER3v2hEPdCa9HyE3H6CvSCU6etbOugVLCj0rpTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357181; 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=vKJB7Dr48XQLeHmExCu5EbfbFcgColVJk4x26felkxI=; b=Jlrfz1VLdviznotHwlebT2QorAzXY3JRgMLs38a/f7TDti1px1toljZlznn6NyL5/xQIE4m7S2BtBW5UO8cE2pvQrDK6SU+Qqut5jT71bBdc125PMFQrPO0fZTcarUlZPFu7ucHbYRqJeEm7IYzo2iOVoeVAVMCM/Tpo7UIUZ0M= 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 1569357181040338.6528342158632; Tue, 24 Sep 2019 13:33:01 -0700 (PDT) Received: from localhost ([::1]:50788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrUY-00006F-SV for importer@patchew.org; Tue, 24 Sep 2019 16:32:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43980) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8M-0000qB-J4 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8K-0002zi-PR for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:02 -0400 Received: from relay.sw.ru ([185.231.240.75]:38094) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8K-0002sb-Hp for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:00 -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 1iCr89-0001Mk-70; Tue, 24 Sep 2019 23:09:49 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 13/25] SCSI: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:50 +0300 Message-Id: <20190924200902.4703-14-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 + 2 files changed, 2 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 915641a0f1..72ac308b6c 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_FUNCTION_BEGIN(); 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..e955f4e0a5 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_FUNCTION_BEGIN(); int rc; int sg_version; struct sg_scsi_id scsiid; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569357386; cv=none; d=zoho.com; s=zohoarc; b=Xg25PBtY+U++00exlYUx3BMfaL3cL7hQ2Iz2CMPGCv8tuffWL8MfO5Ay+toojX6PrXM+DtHWDCfX+IRH0t/Jv57+Pcg3j0wIMAbNV6n1TgwtPMl4EJRg576KiVJcLPo/Sd1gJliz7asOb8yVo7nMHmzRuSwqqGqGk0cEqmU4DK4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357386; 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=ngATDtCdseV/hJVbhgO+yArhdE4onJNF2mgiP0x97YE=; b=YU9dSzKg5fPNVXU17EY0YQ85nQMwyHWnTYatuQN2d0mClhgTfmy2m6AMrEhTLYaNIF+S1xgQ+Kq57Lw9C0+j0Wdn3HD/06TIUMw0tq/ynGDIO0qnSTFLpaYQbJBRiVMfl4h319ip8MO9+tRkFZMjHB8t5gL2dToqKyw35lcKca8= 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 1569357386011233.45148466682826; Tue, 24 Sep 2019 13:36:26 -0700 (PDT) Received: from localhost ([::1]:50826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrXp-0003zE-AY for importer@patchew.org; Tue, 24 Sep 2019 16:36:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43991) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8M-0000qt-Q2 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8L-0002zy-5Z for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:02 -0400 Received: from relay.sw.ru ([185.231.240.75]:38106) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8K-0002sh-Tk for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -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 1iCr89-0001Mk-Dx; Tue, 24 Sep 2019 23:09:49 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 14/25] USB: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:51 +0300 Message-Id: <20190924200902.4703-15-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..9a2ea129dd 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_FUNCTION_BEGIN(); EmulatedState *card =3D EMULATED_CCID_CARD(base); VCardEmulError ret; const EnumTable *ptable; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569357514; cv=none; d=zoho.com; s=zohoarc; b=Ql/K6APcggwX6x23DsJ7M3lHCtSc2SMVT0rhTyuBoxNhqYcBRe2t8kqaw8Zk28QUAnD5bv2s3x1ZNsBiHhGaZ5c5+MJ6NBn5GRe9s05NCoiSLy6aAV9qw0+uvBqtAQ/pzyfscKd196otcVmnaibHpsb/2jGGPrcCRHjCU250F/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357514; 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=4Fd5IHzJaUowSVkNqmZObjFZjj6J8n4Qi1biqH3JjBU=; b=lHZ1oLtmO2nOZd+bhnq48g+6g+cJB642CmGvD+JZAdxmjDXI1wDJQaSy+GbEA/NXoNFxUFXAsVNKLKrw0tSH6PFQ83utQsJVyuAH0ZpcvENaQ++r9OKRul4+AYtCTskRUkG0I21rTQy6IuPRSX5H0yasq6z6guTrKTtHdUb6+qs= 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 15693575146929.769545617052472; Tue, 24 Sep 2019 13:38:34 -0700 (PDT) Received: from localhost ([::1]:50856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrZv-000759-1Q for importer@patchew.org; Tue, 24 Sep 2019 16:38:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44028) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8O-0000sd-2X for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8M-00030c-1o for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from relay.sw.ru ([185.231.240.75]:38112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8L-0002t7-KO for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -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 1iCr89-0001Mk-PQ; Tue, 24 Sep 2019 23:09:49 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 15/25] VFIO: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:52 +0300 Message-Id: <20190924200902.4703-16-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 | 2 ++ hw/vfio/pci.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 3e03c495d8..d08276b1e6 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1437,6 +1437,7 @@ static void vfio_disconnect_container(VFIOGroup *grou= p) =20 VFIOGroup *vfio_get_group(int groupid, AddressSpace *as, Error **errp) { + ERRP_FUNCTION_BEGIN(); VFIOGroup *group; char path[32]; struct vfio_group_status status =3D { .argsz =3D sizeof(status) }; @@ -1526,6 +1527,7 @@ void vfio_put_group(VFIOGroup *group) int vfio_get_device(VFIOGroup *group, const char *name, VFIODevice *vbasedev, Error **errp) { + ERRP_FUNCTION_BEGIN(); struct vfio_device_info dev_info =3D { .argsz =3D sizeof(dev_info) }; int ret, fd; =20 diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c5e6fe61cb..57208c7075 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -2469,6 +2469,7 @@ int vfio_populate_vga(VFIOPCIDevice *vdev, Error **er= rp) =20 static void vfio_populate_device(VFIOPCIDevice *vdev, Error **errp) { + ERRP_FUNCTION_BEGIN(); 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 +2701,7 @@ static void vfio_unregister_req_notifier(VFIOPCIDevic= e *vdev) =20 static void vfio_realize(PCIDevice *pdev, Error **errp) { + ERRP_FUNCTION_BEGIN(); VFIOPCIDevice *vdev =3D PCI_VFIO(pdev); VFIODevice *vbasedev_iter; VFIOGroup *group; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356559; cv=none; d=zoho.com; s=zohoarc; b=L6FMCfvT5Ef+TN94ZoTiiVlAqBLjx4CjiRzoe154EWZbnU9ajhhyFhO2uLf5DVUD8KC5T43r479ooR0t+QhW5X8exaATApJdljybJgR3su2AfcwLPOZrIXObbvsQ9dzkmJuOQLGp7tT7pD0OkhKn7P94ZXbZHkyFfvnxRgw5y/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356559; 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=jjQwA4hmPoF/xIHDcxmImhcbi1gedfCZ/iRkHNcBJZ4=; b=XVyFSLnnOuVA/QbAYQ7wE/RDhlTTyhvmf2NH8orEZDkXFAZsb+V4nkjQ85VT30RkWoVbyokt/JruZ9UpHbm6TtF03WOCNc+Gdhvw61WZClb8mkSVp10/XfwzQ+oo69HNN/vWGkuFhPI17zJl7CpJ+hJgrJ/ie5gMZOuufkzdro4= 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 1569356559972299.0030083803747; Tue, 24 Sep 2019 13:22:39 -0700 (PDT) Received: from localhost ([::1]:50694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrKX-0006Jf-Ud for importer@patchew.org; Tue, 24 Sep 2019 16:22:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44021) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8N-0000sA-Qk for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8L-00030F-OO for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from relay.sw.ru ([185.231.240.75]:38124) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8L-0002tJ-FP for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -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 1iCr8A-0001Mk-2O; Tue, 24 Sep 2019 23:09:50 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 16/25] virtio: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:53 +0300 Message-Id: <20190924200902.4703-17-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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/virtio-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c73..291044c4e4 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); 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 May 7 19:43:17 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=1569357641; cv=none; d=zoho.com; s=zohoarc; b=K9mNbRAAbxiqr93dSvdyCIV8EDFyI0UiUg6OTerCQXFxVG/L5yjCeCrzlpZZCbxYelu6fjvKuCYqtXbV+82UWNU9VS+CNYl4gtWYP3vN/Zmy7Rrk1LK7T9qoDW/VSFyjNbef8l8E0lxcSmKU9QfYRj9o9cL+RTvtcr4C0wyj1NY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357641; 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=H5zNUf9iX5nNLSnx06o2DA4PZHyeQNfhPeOnbmizWPo=; b=hSy6gj0iaXp0VdFwTsAmh/DnYWDFibkjNfTWLyEax42dDEHzqn0GJTqWerrpLSyzaA6qUBCzXH30d0uzDXvo1/R2soRBya06bddMzXnJ0g2irF30EP8tgH5/nNcrCZbmehg8zOEpm8YZMyPWOZ5j9wUpG9FL61C/WtcmZIA4pdg= 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 1569357641700985.6876404451236; Tue, 24 Sep 2019 13:40:41 -0700 (PDT) Received: from localhost ([::1]:50894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrby-00011y-7o for importer@patchew.org; Tue, 24 Sep 2019 16:40:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44024) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8N-0000sH-Tb for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8M-00030k-4B for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -0400 Received: from relay.sw.ru ([185.231.240.75]:38132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8L-0002tV-MP for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:01 -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 1iCr8A-0001Mk-C9; Tue, 24 Sep 2019 23:09:50 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 17/25] virtio-9p: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:54 +0300 Message-Id: <20190924200902.4703-18-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 + 2 files changed, 2 insertions(+) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 08e673a79c..6b1a805575 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_FUNCTION_BEGIN(); 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..01ff411aea 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_FUNCTION_BEGIN(); 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" --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569357104; cv=none; d=zoho.com; s=zohoarc; b=SStnA4h0WdAm7r4qhDPf66tCXfQKSowHDnCK5rVI4ACFMjA+ne2JUIm14B6knzjc2yW9hU47qgkFXVY0NuaZjPw+Od6XtGvA/cpmB2Z5Q0ALWJp4w0Ljz+ev/8K5BTbRJrG3/p6MXnFOw1Hlpk/CmNssyx+QyE6V1kBeikO+3W4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357104; 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=aKIwOZCXvR+DeUhUi0zcN+omZdKyZ7Duwr5CskaVLJM=; b=PRcAZSzoGKt1RKXthf64JzcVSF9ovoaC2zuVAKX8DVpt/WuYeIAbub2RAEg0OIAYXafUbC1neWTBI3wRqas/rbd3sogiom+ePC1BiLvsFrPi6bavITrA/31kDuRyeAvW0zYctCKe8Xcrz7+pfZ7iMQ2/TL9Ca5jhWgS68PK3lsk= 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 1569357104956112.2735297051255; Tue, 24 Sep 2019 13:31:44 -0700 (PDT) Received: from localhost ([::1]:50784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrTK-0007Hz-LD for importer@patchew.org; Tue, 24 Sep 2019 16:31:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44131) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8Z-0000zm-AN for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8W-000397-G1 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:14 -0400 Received: from relay.sw.ru ([185.231.240.75]:38136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8W-0002u5-8q; Tue, 24 Sep 2019 16:10:12 -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 1iCr8A-0001Mk-JZ; Tue, 24 Sep 2019 23:09:50 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 18/25] block: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:55 +0300 Message-Id: <20190924200902.4703-19-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, qemu-block@nongnu.org, Jeff Cody , 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 Reviewed-by: Eric Blake --- block/backup.c | 1 + block/dirty-bitmap.c | 1 + block/file-posix.c | 3 +++ block/gluster.c | 2 ++ block/qcow.c | 1 + block/qcow2.c | 1 + block/vhdx-log.c | 1 + block/vpc.c | 1 + 8 files changed, 11 insertions(+) diff --git a/block/backup.c b/block/backup.c index 763f0d7ff6..8cb0201833 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_FUNCTION_BEGIN(); int ret; BlockDriverInfo bdi; =20 diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 134e0c9a0c..eba47490ea 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_FUNCTION_BEGIN(); 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..46818fe4fc 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_FUNCTION_BEGIN(); BDRVRawState *s =3D bs->opaque; char *buf; size_t max_align =3D MAX(MAX_BLOCKSIZE, getpagesize()); @@ -817,6 +818,7 @@ static int raw_handle_perm_lock(BlockDriverState *bs, uint64_t new_perm, uint64_t new_shared, Error **errp) { + ERRP_FUNCTION_BEGIN(); BDRVRawState *s =3D bs->opaque; int ret =3D 0; Error *local_err =3D NULL; @@ -2232,6 +2234,7 @@ static int64_t raw_get_allocated_file_size(BlockDrive= rState *bs) static int coroutine_fn raw_co_create(BlockdevCreateOptions *options, Error **errp) { + ERRP_FUNCTION_BEGIN(); BlockdevCreateOptionsFile *file_opts; Error *local_err =3D NULL; int fd; diff --git a/block/gluster.c b/block/gluster.c index 64028b2cba..7023807326 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); int ret; if (filename) { ret =3D qemu_gluster_parse_uri(gconf, filename); diff --git a/block/qcow.c b/block/qcow.c index 5bdf72ba33..33a004350b 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_FUNCTION_BEGIN(); BDRVQcowState *s =3D bs->opaque; unsigned int len, i, shift; int ret; diff --git a/block/qcow2.c b/block/qcow2.c index 4d16393e61..d9aac1186d 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_FUNCTION_BEGIN(); BDRVQcow2State *s =3D bs->opaque; unsigned int len, i; int ret =3D 0; diff --git a/block/vhdx-log.c b/block/vhdx-log.c index fdd3a7adc3..24e5efb46c 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_FUNCTION_BEGIN(); int ret =3D 0; VHDXHeader *hdr; VHDXLogSequence logs =3D { 0 }; diff --git a/block/vpc.c b/block/vpc.c index 5cd3890780..b12a2d964a 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_FUNCTION_BEGIN(); BlockdevCreateOptionsVpc *vpc_opts; BlockBackend *blk =3D NULL; BlockDriverState *bs =3D NULL; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356491; cv=none; d=zoho.com; s=zohoarc; b=hafIfNb5b8wAW8oPmT+u5gtKaqYXMX+cyvmhS6xAwern6OVhul4KfwnUCwroOgoejFH1UDe+fzgqgLTRZDLq+w/q90LPcSHNFJw5b1hXhIv26Uwlo9W5UIYrqC6r7w2pPhYfp5rTgp8+YxTjN+duTeldkPh4+hGxT+DBsl1hMcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356491; 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=7EhhnxVuqjb7QOcn9lzw14gxX6XfMrFBVUUIKAtV6o4=; b=MHYivuvENtTeMZdppsOsAKzr7crI4cQGD8CkHKW2Pckr6eGgGFVdydtzNDxCYla/Y1barhVe5nrHxNVF5TvXiQ+MavJ+JcVDLs1Qxwvu6as81wU3bItFRC+uweTzgT0E8SHayfLY9Yg+OHQnTxBKztIAkhBLf6lG6PJV6tUedJk= 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 1569356491795957.5388537100204; Tue, 24 Sep 2019 13:21:31 -0700 (PDT) Received: from localhost ([::1]:50682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrJS-0004li-7k for importer@patchew.org; Tue, 24 Sep 2019 16:21:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44057) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8O-0000tc-RP for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8M-00031G-SA for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:04 -0400 Received: from relay.sw.ru ([185.231.240.75]:38146) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8M-0002u8-Ef for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:02 -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 1iCr8B-0001Mk-2H; Tue, 24 Sep 2019 23:09:51 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 19/25] chardev: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:56 +0300 Message-Id: <20190924200902.4703-20-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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?= , vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..1421c85464 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_FUNCTION_BEGIN(); 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 May 7 19:43:17 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=1569357822; cv=none; d=zoho.com; s=zohoarc; b=gOdtyKJi172c3EzpFbmL7EuRX/FS3yEvMCkd2abngitCIT/95y3Urua2YKFFOaPo2tbvWp85p4v09Rbh5S+4B3Adpd5akZVoC2Skd2rwm5nGfEf92xbBxzu4/VvtOI4ruDV5wJwCZFr6r+s2H6ek69cHPwwwjM0FZPVkoC6gB2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357822; 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=c/Y0guHScUDAT8XAmNfy316beLv5f3DGwtFpftUCHTo=; b=IgMIjPWDq2Gw/Fk9zcdq44N1PhW99Ojufwm3+DI/oo1nhfKlgIQnzWJT5rbrbifIEXWgAE6PvR7CRhE8YGCPAgjAoBM4GBsMhjUYDXA+4frRq/dRXeri2mTfY9pnH7VYsVsWHxHzw88WMl5Bs0SEyum4WX663r2HgGSSJa164y0= 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 1569357822421513.9263561867892; Tue, 24 Sep 2019 13:43:42 -0700 (PDT) Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCreu-0003zq-RW for importer@patchew.org; Tue, 24 Sep 2019 16:43:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44070) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8P-0000tv-5Y for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8N-00031c-E7 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:04 -0400 Received: from relay.sw.ru ([185.231.240.75]:38150) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8M-0002uJ-PT for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -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 1iCr8B-0001Mk-Ag; Tue, 24 Sep 2019 23:09:51 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 20/25] cmdline: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:57 +0300 Message-Id: <20190924200902.4703-21-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..7136d83b1d 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); QemuOpts *opts =3D NULL; =20 if (id) { --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356740; cv=none; d=zoho.com; s=zohoarc; b=nhwIiTvLhaGQixiRCab08t/7McWcI709fSQ8/5WgNy/wOHGVY6fx6bH49w2QRO+nEnThNr3k9EKPBCjAdUkLrCno8oXcRzB7sbH1GvT/hBSX+YXZ3r+U+KuzYxip0WVuDGvs/3NeKPJaaXlKbr8YTNTQIoHAkbG6EZcos1By0WE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356740; 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=EVNokW/5FkevMtaAqJ9S//0iyoDringbLRsFBwyGrEM=; b=f8spuw9gOgrpZQJs1SeWwHXp4/ymzx+o2Y2FYnduXvXw1Jw6Ed321UucibvXxXnOIk2eqfBx/DD0LBmpsj6ASBh+IXTWI6wEFn0NHmwQy95kSVkj9DaPQwOtPhF3uAcJ6gNsaHKd5hGQSfI7j3elL+CgYWpzTF4ZQgO+aV47hQA= 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 1569356740014544.3324884186325; Tue, 24 Sep 2019 13:25:40 -0700 (PDT) Received: from localhost ([::1]:50736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrNP-00029W-MY for importer@patchew.org; Tue, 24 Sep 2019 16:25:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44069) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8P-0000tu-5p for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8N-00031m-Kp for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:04 -0400 Received: from relay.sw.ru ([185.231.240.75]:38158) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8N-0002uR-02 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -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 1iCr8B-0001Mk-Kj; Tue, 24 Sep 2019 23:09:51 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 21/25] QOM: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:58 +0300 Message-Id: <20190924200902.4703-22-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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 , vsementsov@virtuozzo.com, =?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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 --- qdev-monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qdev-monitor.c b/qdev-monitor.c index 148df9cacf..d0129411fb 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_FUNCTION_BEGIN(); 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_FUNCTION_BEGIN(); BusChild *kid; const char *sep =3D " "; =20 --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356829; cv=none; d=zoho.com; s=zohoarc; b=j5+RmDqTbLWXgllaovgYkfRmYICCDEFEhVRyYegJJ3vnE+mNvFeEpEyX+lUV4lAeGucW3PcYsFOUiVNHusqZ8B8ddRf4zKsIbDqTPzQHQ4DrcLxAjpT56UrruGAuP0IJofmIh0ujT0J+DjSS8DhiwME+0tluGK+QXpfqno5Gu8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356829; 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=qfEVrbX0Z79dHGh+NKU/x3e34olbVP9618uj70FICxI=; b=Lih2fzJTLMpcYBG3MB9ApOcrYgjuXrjFtdNxUuw6D/DkGUByIu5p+eHJBck2YwtuZD3+jlYYwBb42EfcKUSIyjlqKiYMoc63Q9ejVTrxAoaPK7yYp23uAduG7Dovq+IUo+v5XfIZstAyvNHbmZTKFH5sD3Rx3DCc34YrSwBycQA= 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 1569356829345564.4611276928559; Tue, 24 Sep 2019 13:27:09 -0700 (PDT) Received: from localhost ([::1]:50746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrOu-0003UF-64 for importer@patchew.org; Tue, 24 Sep 2019 16:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44077) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8P-0000uB-AW for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8N-000321-RQ for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from relay.sw.ru ([185.231.240.75]:38168) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8N-0002ud-D0 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -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 1iCr8B-0001Mk-Ry; Tue, 24 Sep 2019 23:09:51 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 22/25] Migration: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:08:59 +0300 Message-Id: <20190924200902.4703-23-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index 01863a95f5..031b85e670 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_FUNCTION_BEGIN(); MigrationCapabilityStatusList *cap; bool old_postcopy_cap; MigrationIncomingState *mis =3D migration_incoming_get_current(); --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356625; cv=none; d=zoho.com; s=zohoarc; b=MqBbAepnmo2E3ufgXNnp3yN+vvmMq48XphT4iums+E8LeKlTdBE7FYo3GuAExOGmMsy4sAsKqnV+6DYZBuU9WcgWY3qaWMRvvFF04ibXMlSxOhQ2gMFL/Aiv5FgtDLAt8a3rI4AXs3p9vbnygc3mbbFYf5ysOM3yVOz02Tvhi80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356625; 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=PBbnIhxpB9iTAiH90B0gfT4VGcPgUgiOfxms7FSTNu8=; b=QwTFnVJQ/AtPoDJ2h0tQY7RYw9oQDOuD5etm/rs9mdVgC1qH2lJFu8VmE/OOwYekGntg3FCGpubVZQ/0+6gELKdfRcefhqgJj7URuWs/Ozlk26xMClFB1khDdHPSsKhpYG/9M2T/fjA2FydiVbEwN8nDiHJ+Q1mASczkn+UrZHk= 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 1569356625724673.3699814217604; Tue, 24 Sep 2019 13:23:45 -0700 (PDT) Received: from localhost ([::1]:50704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrLc-0007oZ-2a for importer@patchew.org; Tue, 24 Sep 2019 16:23:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8P-0000uW-D8 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8O-00032I-10 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from relay.sw.ru ([185.231.240.75]:38174) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8N-0002un-G6 for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:03 -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 1iCr8C-0001Mk-2A; Tue, 24 Sep 2019 23:09:52 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 23/25] Sockets: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:09:00 +0300 Message-Id: <20190924200902.4703-24-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, =?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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 Reviewed-by: Eric Blake --- util/qemu-sockets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 98ff3a1cce..fb21b78369 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -860,6 +860,7 @@ static int unix_listen_saddr(UnixSocketAddress *saddr, int num, Error **errp) { + ERRP_FUNCTION_BEGIN(); struct sockaddr_un un; int sock, fd; char *pathbuf =3D NULL; @@ -935,6 +936,7 @@ err: =20 static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp) { + ERRP_FUNCTION_BEGIN(); struct sockaddr_un un; int sock, rc; size_t pathlen; --=20 2.21.0 From nobody Tue May 7 19:43:17 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=1569356661; cv=none; d=zoho.com; s=zohoarc; b=JxefL5NaXawI6uIBrtlLQzMJx+9NMsCO0uI6G4gRRqMqgcjNNqQ1ULlaBTmPoOKZhaFNGt2dCp54VrWXXzjt4qkl8r0NIDtdSB7qBETwk0FnKuz6rYhU2+kpxgRrFl8zgs1kuelrXvy4ExqbRU4COoZ/Q8faJGQ+SxQAsVtA7Do= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569356661; 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=F3qixLomwdMKObvOywV+tFTdr6xjFLSAn9Ar/vqGPgE=; b=P1xVTmgm2dPoA3POm9owwi6zqLLd9M8iKSWMI+XpGclH31B+O4hnx1A53VpxC5CyaLsYvvk6hsSlwebRgHPAWWOPdn3nu4CG6z3qBg/QzNTW3b0jsxZerhk1qOoDbmAQ7wvJHLcxWLTw0Utp/kdCdoMJad3YxvGCgjEItVLmf3g= 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 1569356661862314.66385911611303; Tue, 24 Sep 2019 13:24:21 -0700 (PDT) Received: from localhost ([::1]:50714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrMC-0000Zh-9h for importer@patchew.org; Tue, 24 Sep 2019 16:24:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8a-000121-He for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8Z-00039z-8e for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:16 -0400 Received: from relay.sw.ru ([185.231.240.75]:38178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8X-0002v0-Np; Tue, 24 Sep 2019 16:10:14 -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 1iCr8C-0001Mk-AA; Tue, 24 Sep 2019 23:09:52 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 24/25] nbd: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:09:01 +0300 Message-Id: <20190924200902.4703-25-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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 Reviewed-by: Eric Blake --- nbd/client.c | 1 + nbd/server.c | 1 + 2 files changed, 2 insertions(+) diff --git a/nbd/client.c b/nbd/client.c index b9dc829175..4d90a26c00 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -153,6 +153,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_FUNCTION_BEGIN(); g_autofree char *msg =3D NULL; =20 if (!(reply->type & (1 << 31))) { diff --git a/nbd/server.c b/nbd/server.c index 28c3c8be85..09565ad8dc 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1616,6 +1616,7 @@ void nbd_export_close(NBDExport *exp) =20 void nbd_export_remove(NBDExport *exp, NbdServerRemoveMode mode, Error **e= rrp) { + ERRP_FUNCTION_BEGIN(); 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 May 7 19:43:17 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=1569357997; cv=none; d=zoho.com; s=zohoarc; b=CBf+LjCddzi8VQra85xn+xln5UEJJ6HjP0XaqahhWf0PmCMNNa/Bd10xpLiQonD4EItErUEkp5qQM3ybFVRYyHXm53/iXla8ALrPU5jw17TNv7ReFq57XMSMuThqhXmW6XM1NjwvYo9rql7Uzj0l1v9bfKCtQLIUT6dZjv9S02w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569357997; 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=WFNEvsmAxYMmZ1KBkmyfzHxiHAYffN7ap8he+rHOJi0=; b=en5NqvaTWMPGirhksVhXg1QjtiKgcwllM+AjWbk3j3mRLjS5mKTJqypOyyS/lqjhsYNtlYW0/8fJj6JYvcKJ0wy2/GNtEQRY41IyW11kpN5Bt505v9y9brZzfh/z0lgctyPlH1wvI9OFgxzd9SOQ9j46m+e+KLjhy15Yn/nbPj0= 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 1569357997045862.327652182387; Tue, 24 Sep 2019 13:46:37 -0700 (PDT) Received: from localhost ([::1]:50956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCrhj-0006Hq-JR for importer@patchew.org; Tue, 24 Sep 2019 16:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44097) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCr8P-0000vJ-Rl for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCr8O-00032a-DA for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:05 -0400 Received: from relay.sw.ru ([185.231.240.75]:38184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCr8N-0002vB-Ug for qemu-devel@nongnu.org; Tue, 24 Sep 2019 16:10:04 -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 1iCr8C-0001Mk-HJ; Tue, 24 Sep 2019 23:09:52 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-devel@nongnu.org Subject: [PATCH v3 25/25] PVRDMA: Fix error_append_hint usage Date: Tue, 24 Sep 2019 23:09:02 +0300 Message-Id: <20190924200902.4703-26-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190924200902.4703-1-vsementsov@virtuozzo.com> References: <20190924200902.4703-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 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: vsementsov@virtuozzo.com, 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 append hint to errp, we must use ERRP_FUNCTION_BEGIN macro. Otherwise hint will not be appended in case of errp =3D=3D &fatal_err (program will exit before error_append_hint() call). Fix such cases. This commit (together with its neighbors) was generated by git grep -l 'error_append_hint(errp' | while read f; do \ spatch --sp-file scripts/coccinelle/fix-error_append_hint-usage.cocci \ --in-place $f; done and then ./python/commit-per-subsystem.py MAINTAINERS "$(< auto-msg)" (auto-msg was a file with this commit message) 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..3cc02311bf 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_FUNCTION_BEGIN(); int rc =3D 0; PVRDMADev *dev =3D PVRDMA_DEV(pdev); Object *memdev_root; --=20 2.21.0