From patchwork Sat Oct 22 04:40:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13015789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7B4AC433FE for ; Sat, 22 Oct 2022 05:47:07 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1om6L8-0005gn-Kj; Sat, 22 Oct 2022 00:42:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1om6L2-0005gD-BU for qemu-devel@nongnu.org; Sat, 22 Oct 2022 00:42:24 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1om6L0-0003vC-R1 for qemu-devel@nongnu.org; Sat, 22 Oct 2022 00:42:24 -0400 Received: by mail-pf1-x434.google.com with SMTP id d10so4434873pfh.6 for ; Fri, 21 Oct 2022 21:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VdRBbwSHXA2hZ9q0dYrm3zPKzbn5novCr9BGWMdAXZc=; b=zyoC3s/705vxSDukPcuD0Ov1B7hqKtjGdDgiQG+3kdDvfPIvdiU12lcG7tUG3atihm 1NorqQGEZ3YNGFeYYj0LjWNIf7lr/VNd6YO20uQRJMZ0ESwQMVKw9vXeUER0qnqd56gI WiReQvplu/vl0obBGGbW2NjYk+VZAkb21P/M6cBQja+R/28K9xgLsa2mnC8ABpQWJ7zN afKwQeRJX5MShPGO84J/CV0qu5bKWgXsZ0/wy6zdpbE36SS8Z8fctv+uhMeDmIl77aWC hdbubTgW0GB0IdopOHEPyV1Lo81spo8VmIzRb0yIyoTNoLfTS4JjbDnNjtnon3120GKZ gt7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VdRBbwSHXA2hZ9q0dYrm3zPKzbn5novCr9BGWMdAXZc=; b=GUl2v4NtzsDJnFvz2KrnHuWiuG0L1UV5vDSpR5Xz5R+6V5AHucFJakEAa/WxWya6an hSIm1s8yPhupj2lDdmwG0bWSmdSlKtxeTm6G5e05rDINxtoJhX5h0qzLIolPrt+i5uCF jNCCwiRLoUn3Zs1uAUBRr7VqtkhH48V2YW961tJdAEq7JOiinlsutwp0oKsfCmUpunay D8PLjHnm3xAXdkz3qJGn+YfzNM6OTy4KahlKrqXRrtOuGHApTV3/g7NgaWl+cPfSN13K uhgjZPdj8jEZJnM+oqHHr1bvMqc4K/8e4OmeIisplCFFXAGxml4ykXUKJg1yqSbqLVab z/uQ== X-Gm-Message-State: ACrzQf3fInD+XTLan2yjGMGP0/qVzSiqjAAtSpiFMPFj/WxT1CoZN3vm L4yX/Ax6k2vxIAw8g3gWzBq5KQ== X-Google-Smtp-Source: AMsMyM6IxW2f+QZn32YJm8nYilhtkbNfsfNZHXw7whXZ8WF4jAXCEaKsANsFGDKkCqkFciePXlVGxg== X-Received: by 2002:a63:91ca:0:b0:460:c58f:3127 with SMTP id l193-20020a6391ca000000b00460c58f3127mr19221946pge.31.1666413742187; Fri, 21 Oct 2022 21:42:22 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id y16-20020a17090264d000b001868d4600b8sm178049pli.158.2022.10.21.21.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 21:42:21 -0700 (PDT) From: Akihiko Odaki To: Cc: Alex Williamson , qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, "Michael S . Tsirkin" , Marcel Apfelbaum , Gerd Hoffmann , Paolo Bonzini , Richard Henderson , Eduardo Habkost , John Snow , Dmitry Fleytman , Jason Wang , Stefan Weil , Keith Busch , Klaus Jensen , Peter Maydell , Andrey Smirnov , Paul Burton , Aleksandar Rikalo , Yan Vugenfirer , Yuri Benditovich , Akihiko Odaki Subject: [PATCH v2 14/17] hw/vfio/pci-quirks: Omit errp for pci_add_capability Date: Sat, 22 Oct 2022 13:40:50 +0900 Message-Id: <20221022044053.81650-15-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221022044053.81650-1-akihiko.odaki@daynix.com> References: <20221022044053.81650-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Received-SPF: none client-ip=2607:f8b0:4864:20::434; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Akihiko Odaki --- hw/vfio/pci-quirks.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index f0147a050a..e94fd273ea 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -1530,7 +1530,7 @@ const PropertyInfo qdev_prop_nv_gpudirect_clique = { static int vfio_add_nv_gpudirect_cap(VFIOPCIDevice *vdev, Error **errp) { PCIDevice *pdev = &vdev->pdev; - int ret, pos = 0xC8; + int pos = 0xC8; if (vdev->nv_gpudirect_clique == 0xFF) { return 0; @@ -1547,11 +1547,7 @@ static int vfio_add_nv_gpudirect_cap(VFIOPCIDevice *vdev, Error **errp) return -EINVAL; } - ret = pci_add_capability(pdev, PCI_CAP_ID_VNDR, pos, 8, errp); - if (ret < 0) { - error_prepend(errp, "Failed to add NVIDIA GPUDirect cap: "); - return ret; - } + pci_add_capability(pdev, PCI_CAP_ID_VNDR, pos, 8); memset(vdev->emulated_config_bits + pos, 0xFF, 8); pos += PCI_CAP_FLAGS; @@ -1718,12 +1714,7 @@ static int vfio_add_vmd_shadow_cap(VFIOPCIDevice *vdev, Error **errp) return -EFAULT; } - ret = pci_add_capability(&vdev->pdev, PCI_CAP_ID_VNDR, pos, - VMD_SHADOW_CAP_LEN, errp); - if (ret < 0) { - error_prepend(errp, "Failed to add VMD MEMBAR Shadow cap: "); - return ret; - } + pci_add_capability(&vdev->pdev, PCI_CAP_ID_VNDR, pos, VMD_SHADOW_CAP_LEN); memset(vdev->emulated_config_bits + pos, 0xFF, VMD_SHADOW_CAP_LEN); pos += PCI_CAP_FLAGS;