From nobody Mon Feb 9 01:20:04 2026 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