From nobody Wed Oct 23 00:38:28 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=1727084395; cv=none; d=zohomail.com; s=zohoarc; b=m6AB04vK4KSQu18P3OUz44Uh3t3rjEr20fViRW4+nv7w6mavF2MsvbSJ21/hPLWZAqaKyBbEIzbXBSNiY9IuhM21aAPKEl7bdQln7fhmmK84mt0G3ZpezNMRsz8Co7yuiWdBNgybXfq0WsCIiMshpyt7kIGyf7etFJCxhe3VBnQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727084395; h=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=QazYJuwkb+nuQnDTinA3pE/6s10IXt5ACq+vDFbVeD4=; b=Ac9yKKoFhf7MyqyiBoDxIS7E2F2IKIY+ER40DvD7x/lkPzgfQZlCM8mnXXUqGOHBVNkvp75vmXYWqRbTnNqz1aSiJAieRiKAzOfaSOEzdTR41AxQ9s6RbrAVmWmBuFT6KGRTGO64MTpmh/pO8swAiyvYSD3L22MCxf9XVsXcD38= 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 1727084395125867.2993480310621; Mon, 23 Sep 2024 02:39:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssfQD-0004z8-Qh; Mon, 23 Sep 2024 05:31:59 -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 1ssfPz-000485-Hg; Mon, 23 Sep 2024 05:31:43 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ssfPx-00072s-Tq; Mon, 23 Sep 2024 05:31:43 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a8d56155f51so496320166b.2; Mon, 23 Sep 2024 02:31:40 -0700 (PDT) Received: from archlinux.. (90-181-218-29.rco.o2.cz. [90.181.218.29]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a90612b3f6fsm1188747166b.107.2024.09.23.02.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 02:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727083899; x=1727688699; 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=QazYJuwkb+nuQnDTinA3pE/6s10IXt5ACq+vDFbVeD4=; b=d7ImnK2lECBrjc0jm6ETz+EX2x/rMCjVk94APZwPut4Wfz1an10+r6nj9whvqzWO2A kZIx2ysQ5f9VQF+MkUS9L4vUT+VIhKPxLMQN2sC/DAH64q067pO6W3mW9w8cGsOUNioU 7E4bD+mInsX8HBR/AJxP1GAlz6DCFayFZONN9wfQJnFV9KlhonM042h7SXKo+MyIe1uJ bF3Fpe2VU2dLXbdl2RCZNxS4Fzp3iS5WeZHSq7DgWbWhyumbvPSugs4wDR+RAsdw1cVB O9S7NIEgslD4qVGmmiFn3leLJzeczFaU7Ar+n8vEbeLZ22GQjjDJdsMahwGEZpbKRG9n giHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727083899; x=1727688699; 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=QazYJuwkb+nuQnDTinA3pE/6s10IXt5ACq+vDFbVeD4=; b=fFGechHVNJWwonhVHZhSyypVNW/QaVTqQ4i2sQsvQv9HJadUa1ChvnxgIDR42RUuhA FZHskGAR4eFVGdrRetJelheSoHUhpUdo2ML5Q2nKUpcS3HLs41gdxcMn1YZTqaxhGPnQ ayyfn2QXORflf7pzuUSt7e5b0SPhAzRVnYVQt+xz0He4QFab7zBwIVJfwew60ulNjt1e Q2Fv1OJbTH7XtWmEeDo7iVye5sep1yGtuTO++002yZcnfqZmghb7fVuyxV/37zOj4qwS TWB5vHZMd+Oeqee6WTeb6MuK7h9JiS2orjUd4lAtsG+tMmie4pb1GmbgjHNFQcrQ3xHO 0JGg== X-Forwarded-Encrypted: i=1; AJvYcCWHuIi7P+0XOG4bvzx2M/0V4NBgus+c9I1JYxa6hGEGJPhHRWKqHmZH6uyu2fgitrJ7tWyNLNuGOLM=@nongnu.org, AJvYcCXFXEAxSDjau9dYK68gjVQBXWR1HngMzxDK+Y9sgQ50NVqe/a0rLc7JIdyx973A/D0sVaqBbAIZoYSW@nongnu.org X-Gm-Message-State: AOJu0YzLT6hk795g7fzlCT0NwYpGEICzQk6yTdygpQQu/tHuvG/vkPyq T71CEOrkfmH1B0FW3dQNr9GAFzOuKNwSjhUPn0TMRnnclrAqpKwPF9wL4A== X-Google-Smtp-Source: AGHT+IHiW18NJQyxd924KS3hFzgS8ngM98lDZCBq7qV+osEvw/ye+oDjvWfs/Sl7gbTW4ln8yMTUzg== X-Received: by 2002:a17:907:f704:b0:a86:80ef:4fe5 with SMTP id a640c23a62f3a-a90d50ee84bmr1037087466b.47.1727083899120; Mon, 23 Sep 2024 02:31:39 -0700 (PDT) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Hanna Reitz , qemu-ppc@nongnu.org, Kevin Wolf , Corey Minyard , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Alex Williamson , Jason Wang , Daniel Henrique Barboza , qemu-block@nongnu.org, Nicholas Piggin , Bin Meng , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Bernhard Beschow Subject: [PATCH 23/23] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer Date: Mon, 23 Sep 2024 11:30:16 +0200 Message-ID: <20240923093016.66437-24-shentey@gmail.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923093016.66437-1-shentey@gmail.com> References: <20240923093016.66437-1-shentey@gmail.com> MIME-Version: 1.0 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::62a; envelope-from=shentey@gmail.com; helo=mail-ej1-x62a.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: 1727084396627116600 Content-Type: text/plain; charset="utf-8" Avoids one downcast, making the code more type-safe. Signed-off-by: Bernhard Beschow Reviewed-by: C=C3=A9dric Le Goater --- 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.46.1