From patchwork Tue Feb 14 11:21:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 653460 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2971317wrr; Tue, 14 Feb 2023 03:23:01 -0800 (PST) X-Google-Smtp-Source: AK7set9cQt1/93G/AH7qshzkYwdwfxunRvkhNyHsaOS03eSkkPqCmgRoYpoTBMCj3WAIQsG2oOHz X-Received: by 2002:ad4:5f89:0:b0:56e:aa8b:90f1 with SMTP id jp9-20020ad45f89000000b0056eaa8b90f1mr4270584qvb.44.1676373780894; Tue, 14 Feb 2023 03:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676373780; cv=none; d=google.com; s=arc-20160816; b=gxGgKqKbTroDwCscXNgb62/w1Dx0TMUEQPeSSfFb85QTAzDHISfuk8aVYdXmO32des /OQwHqXAdcj0ogQgTCCtrCN7jyRyM4PB8jFE7JEfmo/6dFbm0VikTkJ/GxVLe/8kUVxn 8ryi7dCoX1RH74vpRw/i+YJpUU8s/Ng0VaXloDzgOIGLERrG/QyjRM3ecdXLHgVkcuAI YBEIvoy7eYOp4C9GeWyHwHlHI+2PBFKGXy2Je8KjZaKuKxOcSaERad0ERwMsUxW9QyFp VabU+qGHN3PDI7POxeM8yhitdZqRJO2HZC0fsABElH5Upaj0IrEO1UYe9yoJGo8XFoGh aj+g== 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=LeP6AKBb23eua5IT5SxgOXnFVX9GQV/mNo4lFMo21dQ=; b=Y+waEZLD3KaezF94X7pUxoONn5eSmIBAJ4vdvfRShvXKlEAytmRbFWxxgq+vP4/yCS btKzinKkoCtJiX+ydGhgu+IuhEynhaQ05GTMvEKtlhEH14kWK8jteV5j7cd3ojAwTk2x Bo3vVfgNfo3a6+IksrNvLQLRi1FYel5iY0VdBCOVad9h8UM4dl/XumE7HJsNS4c7Ge/F NSVo7HujofmKKf4HW0JX9/ZV1lxbVkgYbdhg/Q3ovrYSYS0q5LCk9tjwfQWpFHjCyU04 neHFCu+gExu/Z09crdixAFZVAyjRodzSQzf4l7F1/C0k4S0QhyTXQNI1iJ5JQizyjyGA WxnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b+JxMKVt; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b67-20020a379946000000b00722103385casi10492122qke.761.2023.02.14.03.23.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Feb 2023 03:23:00 -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=@redhat.com header.s=mimecast20190719 header.b=b+JxMKVt; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRtOH-0007Vk-7n; Tue, 14 Feb 2023 06:22:29 -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 1pRtOG-0007T3-0w for qemu-devel@nongnu.org; Tue, 14 Feb 2023 06:22:28 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRtOE-0002OL-IE for qemu-devel@nongnu.org; Tue, 14 Feb 2023 06:22:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676373746; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LeP6AKBb23eua5IT5SxgOXnFVX9GQV/mNo4lFMo21dQ=; b=b+JxMKVtEu6TO8o1puEsxujywc2c453et6MnzNdeOwLs/OhKtEPc32tEjRY2F3rXxPMZXD QVAsgrL+tZAZvIfoByI9lmaNpZ3yKHyeuXGNxdgp43EnKHP6N535MVpC6yHn5u2Db4M55M knj9wbKWYyitd4cznnCGR/V/CqtAeWg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-iFudX9RyNfipAgt7TULMJw-1; Tue, 14 Feb 2023 06:22:22 -0500 X-MC-Unique: iFudX9RyNfipAgt7TULMJw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1B78080006E; Tue, 14 Feb 2023 11:22:22 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3516240B40C9; Tue, 14 Feb 2023 11:22:21 +0000 (UTC) From: Thomas Huth To: Peter Maydell , qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Farman Subject: [PULL 22/22] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() Date: Tue, 14 Feb 2023 12:21:48 +0100 Message-Id: <20230214112148.646077-23-thuth@redhat.com> In-Reply-To: <20230214112148.646077-1-thuth@redhat.com> References: <20230214112148.646077-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Use the SCLP_EVENT() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230212225144.58660-16-philmd@linaro.org> Reviewed-by: Thomas Huth Reviewed-by: Eric Farman Signed-off-by: Thomas Huth --- 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) {