From nobody Tue Feb 10 10:54:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1586810144; cv=none; d=zohomail.com; s=zohoarc; b=ELwFepkPP8UxggsQfVvQaWz7PDqlCVYWrwv55OBpj1ZIi9bKJXJMec/eJ6S84+xWS/HDGZ5aZlzWJicdCu/g4Ts9kIkX/B4G5Kqozjhg88n+M3ATrKlHfrT4ZPyBOnlnlOUMMh6vBxUqijyrwXeF3QsBabQpVcrdVBW9JN/BzrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586810144; 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:Sender:Subject:To; bh=TSTOgqIqkHP/A6SEq23VPb4QmBizW4+fbueFj4i2CPw=; b=FJYUEYpBu/9fagWKt5pg55+FvyETYnUjQCpgmlohth5KBv3Hati3hN28d8H9FmzzeL9wmw+93tT1BK8CYSny5I/3sWIkj1FVdn8d7uqTEcgSfoRDAWTVIxxABj+i3c8DKCPVo3tFf9EslrME7uF/QiUvcpkTfutLxHyLgFM0z6A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586810144788132.3751732294345; Mon, 13 Apr 2020 13:35:44 -0700 (PDT) Received: from localhost ([::1]:48524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jO5nz-0006MG-6Z for importer@patchew.org; Mon, 13 Apr 2020 16:35:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34164) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jO5mK-0005DD-Or for qemu-devel@nongnu.org; Mon, 13 Apr 2020 16:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jO5mJ-0000lw-MW for qemu-devel@nongnu.org; Mon, 13 Apr 2020 16:34:00 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jO5mJ-0000lg-GB for qemu-devel@nongnu.org; Mon, 13 Apr 2020 16:33:59 -0400 Received: by mail-wr1-x442.google.com with SMTP id k11so11016170wrp.5 for ; Mon, 13 Apr 2020 13:33:59 -0700 (PDT) Received: from localhost.localdomain (116.red-83-42-57.dynamicip.rima-tde.net. [83.42.57.116]) by smtp.gmail.com with ESMTPSA id i97sm17519238wri.1.2020.04.13.13.33.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 13:33:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TSTOgqIqkHP/A6SEq23VPb4QmBizW4+fbueFj4i2CPw=; b=aNw7cq3+8KXzWk3JWdUnifnGtCtfiMMk9+0FNN4hsxYU8NUL4ihIN0QZ/59z7S5oAE 9wCoMBzMHzsuOao8uSC9ItkEplzIn3uL1PJpbDCefxQ9g4Zn20GqutEnIt5wa6ONZUM2 CDsFJTJF/Q/bfNc6Xw2d4j9VZYqmF2aXwD+UZGL1/d8VxyMKK94dtCqkvnDzZ3+nIHIH v/uDVu5yOfqgBWGWUCbzozu9fcaWmEcV7zDHXx+8qEVwv2+TnC44sgOdr2lJNc/MJGw6 i3FnY1fimduDHHiB/vR6osAUYNHbKd82bulwPjA606/g9LsGyt3q/d26FgwU1LcIq9Dv jwjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TSTOgqIqkHP/A6SEq23VPb4QmBizW4+fbueFj4i2CPw=; b=PFfxoaVRnFcWHoUcYc6ElZCAvwVnQHJ7YuwroiGlmdEUkr0zN6CjDL5JYc33E5SiAm acwYgcWBLzrEoKNJIh6SGvtO1IyCtT+8VggsrdRor3y2OmN8UYOrWaNypLpGGBQc7Yhg XPHEu6wD0N42gF4Q+qwkyxGaqe8YPogjDlyttt4RCcjfAkQ5nzwuSnxNl95vYjp5JP0n Fzf6NY29tzOfq3z2i9ldkhmjqpNTTimzxkY3TdWSIrhKrISQKLh034y7GA5aBcuYQ9Ay rKEy7blegW+ERzqeIfpy1tc+e7OhzNPqw4UhF3JOopgqBN6iJtJOCtK0OLNf8QcXbAD0 +PQQ== X-Gm-Message-State: AGi0PuagBcJu5PNssGlsl8qFM4Nvw8ChCA/oOsfWsTLugg5JV2e3xGAe +xXPhCzUBCat2SJsl5/g09OAOk3rBJ/4Lg== X-Google-Smtp-Source: APiQypJiBME2Z8nP2c+ZIdmqOWuUO4dAGgiEvbalzHjaDeEA0+leygUgmTik2/BLaBUTZP/DabfxCg== X-Received: by 2002:a05:6000:4:: with SMTP id h4mr20875286wrx.386.1586810037973; Mon, 13 Apr 2020 13:33:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.1 v3 6/7] hw/mips/mips_malta: Use &error_abort in MachineClass::init -> create_cps Date: Mon, 13 Apr 2020 22:33:49 +0200 Message-Id: <20200413203349.30590-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: 20200412224517.12869-1-f4bug@amsat.org References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 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: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Running the coccinelle script produced: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir . HANDLING: ./hw/mips/mips_malta.c [[manual check required: error_propagate() might be missing in object_pro= perty_set_int() ./hw/mips/mips_malta.c:1193:4]] [[manual check required: error_propagate() might be missing in object_pro= perty_set_str() ./hw/mips/mips_malta.c:1192:4]] Since create_cps() is called from a MachineClass::init(), replace local Error* by &error_abort. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: Use &error_fatal (rth) --- hw/mips/mips_malta.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index e4c4de1b4e..477ee6cc5b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -51,7 +51,6 @@ #include "sysemu/reset.h" #include "sysemu/runstate.h" #include "qapi/error.h" -#include "qemu/error-report.h" #include "hw/empty_slot.h" #include "sysemu/kvm.h" #include "hw/semihosting/semihost.h" @@ -1185,17 +1184,13 @@ static void create_cpu_without_cps(MachineState *ms, static void create_cps(MachineState *ms, MaltaState *s, qemu_irq *cbus_irq, qemu_irq *i8259_irq) { - Error *err =3D NULL; - sysbus_init_child_obj(OBJECT(s), "cps", OBJECT(&s->cps), sizeof(s->cps= ), TYPE_MIPS_CPS); - object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", &er= r); - object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", &err); - object_property_set_bool(OBJECT(&s->cps), true, "realized", &err); - if (err !=3D NULL) { - error_report("%s", error_get_pretty(err)); - exit(1); - } + object_property_set_str(OBJECT(&s->cps), ms->cpu_type, "cpu-type", + &error_fatal); + object_property_set_int(OBJECT(&s->cps), ms->smp.cpus, "num-vp", + &error_fatal); + object_property_set_bool(OBJECT(&s->cps), true, "realized", &error_fat= al); =20 sysbus_mmio_map_overlap(SYS_BUS_DEVICE(&s->cps), 0, 0, 1); =20 --=20 2.21.1