From nobody Mon Feb 9 23:17:52 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=1585164293; cv=none; d=zohomail.com; s=zohoarc; b=ONI9swlblpvk1yfb9d26+mWEL446q8Is+DokDzyBxvOeP1PYhMkKTu+HdgoHKrSUShnwJLGOqE0Z3s8qgfV9lax25uKB6eZXJMPuGxTiJIoEtYIAMWeVl6HA9G9T/X9KAZeylIs4G087tmq7T6lilvtdIBUWIcR+rTlqmjoi9k0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585164293; 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; bh=wrJdKpRKJHYFpsu8f/k/XHLGFdJX1oGK4sHeuwFlD8Q=; b=KSDkIFmBBXrwgIkUzSCJHt2cP5+1W9FG0HtL8vGC5+Wyin9iCzi5TbmnU64jIrMsf6kATVb/z+BpW7ve10cvVZv4T+KUwlyXzG/ca9jO08emMNB0iTOTM8l6/mGWFWY/Q9gIPxnB9KFNObO4J3Zmh3Blui1WeFlax4mZYER5Nhc= 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 158516429338492.04772727593831; Wed, 25 Mar 2020 12:24:53 -0700 (PDT) Received: from localhost ([::1]:42016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHBe0-0000Qh-7f for importer@patchew.org; Wed, 25 Mar 2020 15:24:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53352) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHBYE-0000Ap-KI for qemu-devel@nongnu.org; Wed, 25 Mar 2020 15:18:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHBYD-0008QE-I0 for qemu-devel@nongnu.org; Wed, 25 Mar 2020 15:18:54 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHBYD-0008Pb-Be; Wed, 25 Mar 2020 15:18:53 -0400 Received: by mail-wr1-x442.google.com with SMTP id 31so4704302wrs.3; Wed, 25 Mar 2020 12:18:53 -0700 (PDT) Received: from localhost.localdomain (37.red-83-52-54.dynamicip.rima-tde.net. [83.52.54.37]) by smtp.gmail.com with ESMTPSA id r17sm6345672wrx.46.2020.03.25.12.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 12:18:51 -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=wrJdKpRKJHYFpsu8f/k/XHLGFdJX1oGK4sHeuwFlD8Q=; b=BJ0/ut6kqXFsqLRtDlE1/SHKtzso+q2uxz1zm7jf93uWxv2mfeJdLUt6SEKSk2nqzS 7sEy6HaszD3JvjQTtblkk6FKF/v3Bl22TTwo3/XaWfuRjNIJJeZAJCuxbt2v5yQ+YtdJ xQU4AtzCye4vIZyvBlSh+p4CnWwjPcgP5YF/5uahBIHXnfb/y3toH1QQmu4TQjvGbn8m jbKxSsc5nQ6J87jGpNvgC/F6dox3wQclJPjQHWW72hYX+4ndgS0/ltFTxZ9P1TxUDsfZ UE6TlrDps3hK5XMfvOcfYCOBLeJc5NsypvDiR+4+DnQhWJpbf/BbqmadAqTBgo+2c447 6I6Q== 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=wrJdKpRKJHYFpsu8f/k/XHLGFdJX1oGK4sHeuwFlD8Q=; b=H8ug+Y8gRPUiHtMi6FB6iohC6pRvc/4yHmng8sYYcQbBF9bs/scxt7E4juT7+Ec1/u /4TenhZlu4M5l2PuqHC51/KmbI1RmVrymDZHuhuU6rLbvzr6XJYt1Y7b5YHKzmB5g0Xa 125ZsRdByxMPAnMmp2VYdVBk4duEqT/8mhv8dlU8EgeTV1jg23MRSRgMvklk8bY64bVR goTS0s1uUZnC5vdqmJ+U6Y4Aw9uDOTmnYGk8iRH0KaKE1xezkGBDCCseZnVcNTFECNy1 wUxbKYc4vS2je/fY/5i4PhwIXVYRPcSoiR4OKVLIMZT3ElBLDQgYSsw6GeMTC9O0vXk1 6QIg== X-Gm-Message-State: ANhLgQ0pjOBTd6YS1cKTSYh/B9gvgAOlKXGn53xjNc431JqsMP0kNOhU oaOHJRix0qlrcVKxSWqT4wZVxPZnH90= X-Google-Smtp-Source: ADFU+vtLpvKpCB9LLgmIxRTvJrownfGJ5Y4wqJnSnshhMqp0Ce2Ane11vdQjML1kw2Kfbs9cXVvxSg== X-Received: by 2002:adf:bb06:: with SMTP id r6mr5157392wrg.324.1585163932103; Wed, 25 Mar 2020 12:18:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.0 06/12] hw/dma/xilinx_axidma: Add missing error-propagation code Date: Wed, 25 Mar 2020 20:18:24 +0100 Message-Id: <20200325191830.16553-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200325191830.16553-1-f4bug@amsat.org> References: <20200325191830.16553-1-f4bug@amsat.org> 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: Paul Burton , Sagar Karandikar , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , Alistair Francis , "Edgar E. Iglesias" , Peter Maydell , Markus Armbruster , Aleksandar Markovic , Palmer Dabbelt , Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Alistair Francis , qemu-arm@nongnu.org, David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , Jean-Christophe Dubois , qemu-ppc@nongnu.org, Paolo Bonzini , 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/object_property_missing_error_propagate.co= cci \ --keep-comments --smpl-spacing --dir hw [[manual check required: error_propagate() might be missing in object_pro= perty_set_link() hw//dma/xilinx_axidma.c:542:4]] Add the missing error_propagate() after manual review. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- hw/dma/xilinx_axidma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 018f36991b..6e3406321c 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -521,39 +521,42 @@ static const MemoryRegionOps axidma_ops =3D { static void xilinx_axidma_realize(DeviceState *dev, Error **errp) { XilinxAXIDMA *s =3D XILINX_AXI_DMA(dev); XilinxAXIDMAStreamSlave *ds =3D XILINX_AXI_DMA_DATA_STREAM(&s->rx_data= _dev); XilinxAXIDMAStreamSlave *cs =3D XILINX_AXI_DMA_CONTROL_STREAM( &s->rx_control= _dev); Error *local_err =3D NULL; =20 object_property_add_link(OBJECT(ds), "dma", TYPE_XILINX_AXI_DMA, (Object **)&ds->dma, object_property_allow_set_link, OBJ_PROP_LINK_STRONG, &local_err); object_property_add_link(OBJECT(cs), "dma", TYPE_XILINX_AXI_DMA, (Object **)&cs->dma, object_property_allow_set_link, OBJ_PROP_LINK_STRONG, &local_err); if (local_err) { goto xilinx_axidma_realize_fail; } object_property_set_link(OBJECT(ds), OBJECT(s), "dma", &local_err); + if (local_err) { + goto xilinx_axidma_realize_fail; + } object_property_set_link(OBJECT(cs), OBJECT(s), "dma", &local_err); if (local_err) { goto xilinx_axidma_realize_fail; } =20 int i; =20 for (i =3D 0; i < 2; i++) { struct Stream *st =3D &s->streams[i]; =20 st->nr =3D i; st->ptimer =3D ptimer_init(timer_hit, st, PTIMER_POLICY_DEFAULT); ptimer_transaction_begin(st->ptimer); ptimer_set_freq(st->ptimer, s->freqhz); ptimer_transaction_commit(st->ptimer); } return; --=20 2.21.1