From patchwork Sun Feb 12 22:51:40 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: 652850 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2125034wrr; Sun, 12 Feb 2023 14:55:33 -0800 (PST) X-Google-Smtp-Source: AK7set94TpQwe9/tx3GdTIKm9E4DlJv5Fbz4gyLjDK3Nsj904A6zHlMbJdM/IpP0VQ98IeWr7FUU X-Received: by 2002:a05:6214:e6d:b0:56e:ac19:a879 with SMTP id jz13-20020a0562140e6d00b0056eac19a879mr4993864qvb.8.1676242532971; Sun, 12 Feb 2023 14:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676242532; cv=none; d=google.com; s=arc-20160816; b=bSk+ZdF/Y8GazTZ0rAGSlcTqA9VYKKHDOhQ0kllYvp5FLWjs2wVF+LG14/VuckK8cT yF5bOkhSVEr+up/vrTOskyNzD8pltZX9LuORzFJqdW64chXsdlc37rhaIcsvqPD+wS2x EXqIaFrJjXnaOWaDadPmbCQ4C/mG4snXSuKfh3iCw+4YOKZ4gh7C+FBMQKm2M+yb5xVG ClNN5uycWrJNg/JlT8/kfnfjlCyvrFeqCSVtc16A4Tjo1z9oqRQH4+chpA5RjVVk2HXi ISJlwMfvxDF8W2R4BN1UKYL1OtI1sYreVxML+ny3HDG3tN/K5C1u986l5HbkPc7B7JR6 DcqA== 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=NDV/3MOvf1E0slojI02q5Z6LE0W6eO3YzsSDsS/V3pFR43YJhAtIoaHHY/3b03BuJb FpqINR19q3BrB0sgG7iVHFvS1RbOtNuFFbgc+Fe4oEnsot2Uzfe8B1EIffNYtS/UVSHN R+RnOTd7YtBD+yluYB2AmtGQ+2iHrvCp3ts4mmv2Qna3/LHJXIZTzYNL7g7Su71yEPuc FpX3aTV9YDqi9JiSFOM7zR4cOEFizZQUUkBWCha7tOs4CuS219ncU73GxzVUr42j578R SZukl04qtvq11wjQVj2M8E78I2ShCVLAgujRribKb40R+mq6kO1JZbvRMY5lthj0HEY5 NsUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wMDTkDiE; 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 g8-20020a0cf088000000b0056ea9a9a806si1822857qvk.13.2023.02.12.14.55.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 14:55:32 -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=wMDTkDiE; 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 1pRLDd-0007uv-6u; Sun, 12 Feb 2023 17:53:13 -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 1pRLDb-0007hL-Jq for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:53:11 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRLDa-0004Cn-06 for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:53:11 -0500 Received: by mail-wr1-x42b.google.com with SMTP id y1so10461152wru.2 for ; Sun, 12 Feb 2023 14:53:09 -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=wMDTkDiE9P74ywGvFhQ8WOjahnH9rnBpW2LAzzfsMR25ZWbj1gyYQeKrQzbC+xVZrW T6ovfMnC7LP+4Nioz582q6mNxxftnq/eHonkgQIT6TLDFlk1Ha0a/7BgjxaTlt6060/N fQR2Y/7XKNNHO2nwK+Qj54F3L/RNPMh5LBhIpp7LI3/iNRI2pNrbgQSp5yqgNRebDgTR wgR8d+Wd2peOcc83wpAcsGs48hQY/XSvWKw/cF1asz1RrGzGysRM99JD//DMORzFkcxx 6L/mrD0VSjXHqeMeiQbwwf4wLbG+il9OGCdoAP+GsWmscnrl2Rg5bx/sEdMJGsjBKBXr FP9g== 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=i/YhocKCOgY2HlyxEu91q8AETY/jajnvCYWIMJos77jjbIu9FodR3wzJLAnq06u7Dw cf3gt6ll6W7qJKhGTasgx6O5El6zHxEhrMimEbHYXdQMzpbhSMCu0WeViGaZ7DTi2waR g7XBy9EHb+XYsIBZHYxF5i2ySnoPjWBie7+GI4J2LwQcNmjgJ8P95uXVri22Pj+4tSjz orQdUChOdmyy+gG5+lg5kqW9+WQa5MMD41N0WplwL6bmIlZ8QAB2ZPX96qNz5upqsyMI CsJHI8ScdyyppCXRVs0mGnPtY63BoxCIGEFwjptZh4NcPrMXsta1lfJaUR+vkzQqSN9T n9aw== X-Gm-Message-State: AO0yUKUyN7/YEQvgf5QJADzL5B6AksNDdW2QostwbNRwwLPFUcq9KSWr 6/wlpZvIR1Ege+zLwjLwYNzpVg== X-Received: by 2002:a5d:6149:0:b0:2c5:5bc0:e7b1 with SMTP id y9-20020a5d6149000000b002c55bc0e7b1mr306213wrt.1.1676242388744; Sun, 12 Feb 2023 14:53:08 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id u6-20020adfed46000000b002bf95500254sm9111258wro.64.2023.02.12.14.53.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 14:53:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Richard Henderson , xiaoqiang zhao , Hu Tao , Thomas Huth , qemu-block@nongnu.org, qemu-s390x@nongnu.org, Gonglei Arei , Cao jin , Li Qiang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , David Hildenbrand , Ilya Leoshkevich Subject: [PATCH 15/19] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() Date: Sun, 12 Feb 2023 23:51:40 +0100 Message-Id: <20230212225144.58660-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230212225144.58660-1-philmd@linaro.org> References: <20230212225144.58660-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 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) {