From patchwork Mon Feb 13 07:08:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 653178 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2266525wrr; Sun, 12 Feb 2023 23:10:21 -0800 (PST) X-Google-Smtp-Source: AK7set9YGHM7tVOr93wKevMJfDRlCqw6VTg5zYKqxlJN9DZNoQoObrXa5KHgKu1KXkWxj+TQsVhX X-Received: by 2002:a05:6214:529c:b0:56e:a9cf:8dae with SMTP id kj28-20020a056214529c00b0056ea9cf8daemr7298263qvb.44.1676272221140; Sun, 12 Feb 2023 23:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676272221; cv=none; d=google.com; s=arc-20160816; b=SyhZ1lWRk3WuWaHQWmyX1xuzbOEkF931JRZm0jt7wmhS+WgHCAxXKgWQYsu8gdLLYO JggrnjAnYJAr/7hze3lo25QMC7MwaW6H7pD0gMkkctehcjgKz/7RWFiD+PrLTp2pZG1Y Zonl8SK94cP5Lc5dynioNXmNkfAxL9Rmf9hvARXn5cLIxk05r929gL9cwxSqWAQHUoAi m6uHqZQ62VWraAuttxx+gKHn4MBBSLw0StyXM2M+q8wMfQ+GnPkt+65e80Lj8OwXPiUZ ODWYeypmN9zd2cx5LKNknRFYL66XOdcHH8s8a0hZcJeU3RcbmK3izdfVyA9TcPkviX6a tltQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3lPcQ4RHMZ3h7WGdkWu74gz5pDiRQhZMKvDRNLxsYVM=; b=nuFrIJVM0N3yb/js9i7HkxdmXpBGJm/yAf3YmdTMeLPRNEWfxaadzHU0DZy97vx829 JOiEtFIEFxhtSFfQ60omM/O+fPFkmFdIYKh4bZRuHuw0DeAzCo3F5kN66bKRxjUPys8P TDqXzHHU98mvN6g/J0rmCzyc169gVtEBMwBzvbKY60VseJA+xNpsTnga9Eppo8HsLkVb 5AkFO/8Z/YbuvjI/ZYlfop9pE/oPDd4fpI6/PgcbSz4iwj6sjRjzQGDLr4IMcLYCwkCf eVL8hKAUCdmeFLgmIIl2YEowYu5lhrzAjXj1HeTrJ0APMvy+V8qV5KCG4Pmo8n9wa4lV JLRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyPLaCOR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o21-20020a05620a2a1500b007058429719dsi9552503qkp.300.2023.02.12.23.10.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 23:10:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyPLaCOR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRSyJ-0003Ut-Jy; Mon, 13 Feb 2023 02:09:56 -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 1pRSyA-000346-TI for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:09:47 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRSy7-00021f-OE for qemu-devel@nongnu.org; Mon, 13 Feb 2023 02:09:46 -0500 Received: by mail-wm1-x32a.google.com with SMTP id l21-20020a05600c1d1500b003dfe462b7e4so8027409wms.0 for ; Sun, 12 Feb 2023 23:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=3lPcQ4RHMZ3h7WGdkWu74gz5pDiRQhZMKvDRNLxsYVM=; b=wyPLaCOROiDrV3rkwxSm3BX+Khn9+ppsF3yoF3tSm4blOeFJkfIjnHVY1Y4Fk5rHIM ms3UKjk7AUEZYPAX1xb/7Y/ljcQch47holiGwTaNILzvdQtry4KZn2ykj9TtGgqi/Bbu jWc1C1jvr2G/MF+VYt2AtjvylsJ3/1OOsbeYgzBsCmV2Asvl9T/XPxmfTUVhOEZP3MM2 Oy8YlXK2GVlV5FhbgYLV4Z4YwuIAqmt7VVV9v37xCEsnKWJ8k8PcMi6SLH7qZmDeb5i9 1u23fGGvwM4oJpjLbmaeDOAYXCNu+nezMJdNkYIIuNyH2F6hmJZqiatIz7mmeT12RGjv ftBg== 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=3lPcQ4RHMZ3h7WGdkWu74gz5pDiRQhZMKvDRNLxsYVM=; b=MOzor00VZiOvmHS6EIgvcQN2k9/K4lwJ+Wmsy2sRBSkLIEdt+VnKG/gBjluOXaKuIM Yh+rxGxcLxOfsGiIMsl1nfT0+a8vfTwmS67s8F1hk1sPcdL2MgONuTZVCy2wttBeDoxS VbQtegYr/GWotJNBLZwwHwXLFc0LApwpP/IvT7iv+ySPCf7U1KQT1XNkcTDWpSLrVjEs 1Mt3MlPlyHYCUEJiiGBSSnOhwYTBX0q7930449HvwXMj41MYZJh1dKIBNhjSYT5SXCfc CjYOcA1K8AaCfDzaWDWtmnYHs+uwoF1LmflGlPfqVTzWgD+XLGSy6vFZXthYYwS66TD6 6nwQ== X-Gm-Message-State: AO0yUKW87id1zcpYkp2NRaquRKhJZ5f8eHNq12T9GfiCLeeCPbCuHTBk 9n4GukvpSr1zureA2xLM1ZdYP5/e5uBIhR/A X-Received: by 2002:a05:600c:4da2:b0:3dc:51f6:8f58 with SMTP id v34-20020a05600c4da200b003dc51f68f58mr18304792wmp.6.1676272180875; Sun, 12 Feb 2023 23:09:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s12-20020a05600c45cc00b003dfe5190376sm13794724wmo.35.2023.02.12.23.09.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 23:09:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: qemu-block@nongnu.org, Thomas Huth , Li Qiang , qemu-s390x@nongnu.org, Hu Tao , Gonglei Arei , Cao jin , xiaoqiang zhao , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , David Hildenbrand , Ilya Leoshkevich Subject: [PATCH v2 15/19] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() Date: Mon, 13 Feb 2023 08:08:16 +0100 Message-Id: <20230213070820.76881-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213070820.76881-1-philmd@linaro.org> References: <20230213070820.76881-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use the SCLP_EVENT() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Farman --- hw/s390x/event-facility.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index faa51aa4c7..6891e3cd73 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -64,8 +64,7 @@ static bool event_pending(SCLPEventFacility *ef) SCLPEventClass *event_class; QTAILQ_FOREACH(kid, &ef->sbus.qbus.children, sibling) { - DeviceState *qdev = kid->child; - event = DO_UPCAST(SCLPEvent, qdev, qdev); + event = SCLP_EVENT(kid->child); event_class = SCLP_EVENT_GET_CLASS(event); if (event->event_pending && event_class->get_send_mask() & ef->receive_mask) {