From nobody Wed Nov 12 20:48:39 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1573476015; cv=none; d=zoho.com; s=zohoarc; b=HqtqMxFaaSXmHXIEaJ3BV2jUhD6Gt96BJ9wKcfBnZ06ufT9t6Hf8Osfcp9say+Piyk59vwdM3ub4zvLZddam54+Tg+Z2rZxWdrghY2pGtd2amNHHEiL8/4/Jzcdmo68MVqcJ4q0/c/bQECYETbuAtuHsVVzu83hSjginl4/tl1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573476015; 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=t2dJp2IzmEGlMQGFOto/hNCGw7mPyqJfKv/3lZ3hoz4=; b=l23qAThnO+7c6yY3Kzcbkc9lDYljzNV07U1qH1t6Fmi2LOSHUAQWL/emyClN3XV/kPAIxYj8A5nVQFwgJXD1jU9eJWJy1gTIhkZbzezGN3uSNNpcGBcsh3oQ7lGYcGIb6cacOtAd0RoJmOrMsCmNdve7HAj4nXOZ5YHlXz5vSuM= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1573476015408983.7450881927102; Mon, 11 Nov 2019 04:40:15 -0800 (PST) Received: from localhost ([::1]:51952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU8zO-0007JG-8p for importer@patchew.org; Mon, 11 Nov 2019 07:40:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37217) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iU8m8-0008GR-K7 for qemu-devel@nongnu.org; Mon, 11 Nov 2019 07:26:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iU8m5-0003aF-SU for qemu-devel@nongnu.org; Mon, 11 Nov 2019 07:26:32 -0500 Received: from charlie.dont.surf ([128.199.63.193]:52324) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iU8m0-0003RQ-Rv; Mon, 11 Nov 2019 07:26:24 -0500 Received: from apples.localdomain (unknown [194.62.217.57]) by charlie.dont.surf (Postfix) with ESMTPSA id B9789BF6BD; Mon, 11 Nov 2019 12:26:03 +0000 (UTC) From: Klaus Jensen To: qemu-block@nongnu.org Subject: [PATCH v3 20/21] pci: pass along the return value of dma_memory_rw Date: Mon, 11 Nov 2019 13:25:44 +0100 Message-Id: <20191111122545.252478-21-its@irrelevant.dk> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191111122545.252478-1-its@irrelevant.dk> References: <20191111122545.252478-1-its@irrelevant.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 128.199.63.193 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 , Javier Gonzalez , qemu-devel@nongnu.org, Max Reitz , Ross Lagerwall , Paul Durrant , Keith Busch , Stephen Bates Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Some might actually care about the return value of dma_memory_rw. So let us pass it along instead of ignoring it. There are no existing users of the return value, so this patch should be safe. Signed-off-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index db75c6dfd05e..4d6f2b48a7f7 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -783,8 +783,7 @@ static inline AddressSpace *pci_get_address_space(PCIDe= vice *dev) static inline int pci_dma_rw(PCIDevice *dev, dma_addr_t addr, void *buf, dma_addr_t len, DMADirection dir) { - dma_memory_rw(pci_get_address_space(dev), addr, buf, len, dir); - return 0; + return dma_memory_rw(pci_get_address_space(dev), addr, buf, len, dir); } =20 static inline int pci_dma_read(PCIDevice *dev, dma_addr_t addr, --=20 2.24.0