From nobody Sat Nov 23 22:54:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730641337; cv=none; d=zohomail.com; s=zohoarc; b=lcyG2QpxQm3L19cI+vyiVcv+2MShFPr6AXmaQu0mV6EpBltsW/7vjdB+s4XbhsiAc/NgYJEbUO8R5mbzFEhcEMK/FXfoorinRFU1PBR81EYIRnjX6a9MVGx4aIepth6io0PHyQpF3itNj+nAwHT4CwI4v1141aSgysDP2jsi1f4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730641337; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=IAOUiCKIF/9rpGUZp0RagAEDLz/RTIzZgvsTWQE7GWgW5IYctpaP7K9gjz2n5qSMGoHuHUXmt0G6bk1Cfh9haCYD4OZKHMECyQZtHnZmNjdtd/mQeIu/8Jyh24psp+S1tvR1/Zpzo4ABrXC6k5imegAbpra/buGKu4xX4PZnBQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730641337449423.8163385715184; Sun, 3 Nov 2024 05:42:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7alL-0006ne-2r; Sun, 03 Nov 2024 08:35:27 -0500 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 1t7alD-0006eN-Fu; Sun, 03 Nov 2024 08:35:19 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7alC-0001Xq-1g; Sun, 03 Nov 2024 08:35:19 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso4212633a12.0; Sun, 03 Nov 2024 05:35:16 -0800 (PST) Received: from archlinux.. (pd9ed7f6d.dip0.t-ipconnect.de. [217.237.127.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9e5664350esm424328866b.159.2024.11.03.05.35.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 05:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730640915; x=1731245715; darn=nongnu.org; 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=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=WTGYvfydV8J+ZtL8tJtVG/AGXpLFNab0Gyo5GHJCHmYzto0vCz/8/DyP/l5ZKgVGla erDPLPwOCbLxlutCntSoqEiT7rnEVvgcYWYcD4OFcn4XYwzotjD+bqxQHC/3BhNGjasL ikd54AO1dJWp2fwXJITd8Lmp+VXV8upjquU6XDf65Pa439y27KwX+Q96aikcW94VxGnw CgI29QA+ZmQByrhoqQksEsxhJzaiBOYlXVEprpALU6NOwfuOECHSQKhWwIYED1A2dmAc 9bXyQL9+Vy4OlLTdeH14K0gU+/Z5mW27JxUShUNG+tZLQPWjp2hfFx08hINxaiBXvpVn NXxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730640915; x=1731245715; 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=uVflLGHPyO3cQe2iVaao8/FC1//CU9ki9Sx4TSq7Uus=; b=F0jyZqG7K2hoEnKoXAmI44o8ayRjiKmdZCwLAUfpsir0miDDOIbwB0OTXz3U0cI1tF UvR8rINAwpLlvx7hVj2vJI/p4np+s4aOT7pbsFfDGNeqOxs40Ydhm4GtqujzPQaidJHF WwtnUjnNOQylUdX+8fvxHCD2tq85N+9OT0hs1HD+c0PuvHk66TeJtlPaBb/AXYiSvPhT 0f533Rj9OVhb/1v7KTqVVj8tlw5MDod5XUOfoKOie/J9/9s1A+N+qaM8/nWiCgwhNSmY PCPvKe1fOWPPgpm+9irzPd7WCdDA6XUtpnanI0hb6i8NKzOHedC2zP2f2TBXkP6gMfhs keJQ== X-Forwarded-Encrypted: i=1; AJvYcCVYDVt6N/qASK+uuxW1EGVvRbMXexOJlJ2Jka/wldlvm5Pvhd6SgtFl46Z+YXGLfzGs/8dbC1OffZ4=@nongnu.org, AJvYcCWy9QM7jyhahbfJ1AgTv1sNKDHAfAH6a61PZpHmkfxG4vbq+uiEdiz0azQGmxKO3yCNUTi0UEa1oYBX@nongnu.org X-Gm-Message-State: AOJu0Yz5jZYJSJDh/Qpu5kJHV1vTyV1tTUhfq4U1GuL4eD09Br3nXOce C+q8vjM59p1AT/tSryE9AjdzFUiJxmZ9L/RZNQloQWThPyUqPEmkZI5fPA== X-Google-Smtp-Source: AGHT+IFSAMzYZp3iO2kUylRyZZ1WNNzMYdgRFsRmn01AOrdiyrwCTjRWWPYSZ647eiOxZXftkF4AwA== X-Received: by 2002:a17:907:9604:b0:a99:f4be:7a6a with SMTP id a640c23a62f3a-a9de61ce626mr2663539666b.47.1730640915260; Sun, 03 Nov 2024 05:35:15 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Jason Wang , qemu-ppc@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paolo Bonzini , Hanna Reitz , Nicholas Piggin , Corey Minyard , Kevin Wolf , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow , qemu-block@nongnu.org, Alex Williamson , Daniel Henrique Barboza Subject: [PATCH v4 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer Date: Sun, 3 Nov 2024 14:34:11 +0100 Message-ID: <20241103133412.73536-26-shentey@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241103133412.73536-1-shentey@gmail.com> References: <20241103133412.73536-1-shentey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=shentey@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730641338616116600 Avoids one downcast, making the code more type-safe. Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Bernhard Beschow --- hw/vfio/platform.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a85c199c76..77bbfbf62c 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -318,13 +318,12 @@ static void vfio_platform_eoi(VFIODevice *vbasedev) /** * vfio_start_eventfd_injection - starts the virtual IRQ injection using * user-side handled eventfds - * @sbdev: the sysbus device handle + * @vdev: the VFIO platform device handle * @irq: the qemu irq handle */ =20 -static void vfio_start_eventfd_injection(SysBusDevice *sbdev, qemu_irq irq) +static void vfio_start_eventfd_injection(VFIOPlatformDevice *vdev, qemu_ir= q irq) { - VFIOPlatformDevice *vdev =3D VFIO_PLATFORM_DEVICE(sbdev); VFIOINTp *intp; =20 QLIST_FOREACH(intp, &vdev->intp_list, next) { @@ -417,7 +416,7 @@ fail_vfio: kvm_irqchip_remove_irqfd_notifier(kvm_state, intp->interrupt, irq); abort(); fail_irqfd: - vfio_start_eventfd_injection(sbdev, irq); + vfio_start_eventfd_injection(vdev, irq); return; } =20 --=20 2.47.0