From patchwork Mon Feb 13 18:43:30 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: 653213 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2581316wrr; Mon, 13 Feb 2023 10:46:04 -0800 (PST) X-Google-Smtp-Source: AK7set8/HwZEyiR35xxvpPTFgvAT7t6Ch5IDRiFed9h8p3OXefOpsj0yax5FA2ZsIH7rZzKWmSvD X-Received: by 2002:ad4:5be8:0:b0:56e:a658:84e4 with SMTP id k8-20020ad45be8000000b0056ea65884e4mr11182789qvc.36.1676313964438; Mon, 13 Feb 2023 10:46:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676313964; cv=none; d=google.com; s=arc-20160816; b=q3tFDiylwaOt86TFWSG4btNBTbA0AZoigDvsdy1Oz69bgWwVHTGX+hhvKxrB1E6wXV d3I25d4tJQdHGdweTYlYpRiTiKFEgwBhWqLDyiXFSfN28LBesnyUNFEVrBaQpXZFAFZh zkweGJFatUeWXefOFGtZ7qLkQF481jGq5RO6dX9EhcREYdXxQ67g6ha3eoCh+lWHdLKq DWQeBbum7IcOjRo5tv9sgvVbsRu78PyOAJNO5wj8DgsKDgmiPyHsYDTbT8ijAaT24CoH lMq6OjbBMdhpOwXw2B9NM1BCA6Ff6KlI755Q8q1DPz0JOaZfrx8MVHWl+QNlH76rbql9 SHVw== 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=JeDWNjpVkKdLbShBUyGUp3JADBIyaux21T6WZ6Gmeuk=; b=KO4fDkVZFVW2kiZB36YuPcxtc36jGLbdpGNLkTGtKy169hVoWhvh8CMJuw/VMo2Qhd ynZTFjYODLChAawQhyGL89zc7X42tiBsYUq1MGI2/8Qi5jMQNTM78Krir4jtyWylZYgs h1cGK30ULsjapQ2KmuQ3PdAD5G6wwz5gIl4FOtoIlBN+EUGAuOp6gHeiaerXmx4R0j6i G6SqcVZjEyEjjqR9Lo9zwkzSSwa155ELqx3d8D6Wn5p4137rnuWXB2iY6gKfnIBxt+O8 Df6fZEUZAS3YITreub9CAEinvCTrxfXzZAyQGXS2Sj8ZZTQUcbdFoX0UJKvuzUStuLCd ioTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wyGNJ1e9; 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 q28-20020a05620a025c00b0073b203efd8bsi5249111qkn.533.2023.02.13.10.46.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Feb 2023 10:46:04 -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=wyGNJ1e9; 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 1pRdoI-00018c-2h; Mon, 13 Feb 2023 13:44:18 -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 1pRdoG-00017e-G1 for qemu-devel@nongnu.org; Mon, 13 Feb 2023 13:44:16 -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 1pRdoE-0008S7-FA for qemu-devel@nongnu.org; Mon, 13 Feb 2023 13:44:16 -0500 Received: by mail-wr1-x42b.google.com with SMTP id bu23so13250387wrb.8 for ; Mon, 13 Feb 2023 10:44:14 -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=JeDWNjpVkKdLbShBUyGUp3JADBIyaux21T6WZ6Gmeuk=; b=wyGNJ1e9rn/cDhznCSVxUi9QrvUJeeLe8uPIVaQFHCRyHTpKxt2Ypmp10tI6tUxfB0 sRoKpqNXV7RKip9Zc4kvT8+TygwQdjYtYghtf+HCqxiYCo41uqy5VuWVd4IJaE0LFjao E0mbxveHTg9HG2TAjcMMZVRKAivzx/2x9wDzJJgE+YhRsm5baDHC6JBA5I1cuQvgh/zj 3mlprAZ9z/U0phbuPrcs8ylB2nhWVEyHQ9jQEHR1eCu3/3AMAm54xj1XDz+Z0krnMl3H EkrRuQ8Kx+o9+VFy0QP5L8SQf0Gxz3lzHBa0iHHVSR3mzhyraF5058ynu7rE8/5/LX6C iSfw== 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=JeDWNjpVkKdLbShBUyGUp3JADBIyaux21T6WZ6Gmeuk=; b=uZwcHTgMk0oCtF39RATeBZCX4o0DegQk2tYJP7eYTI1fVycdBfDhJu0tgLk/QVI98P dKAkITN8bMuB2Cjnbriane2JQBxGtW+zUfVrDLBfgwEnOp5aiXlpJfAuERYGopFgq1N4 ABBymGicJeB7WValiCf/eRJI5DgMzwgo/VaiuBrQUE3MwFNrL8trFiKQDHnr0BAPUvVa bsOH71TvCrBku6820huRW40RKhwFrlrLa6aMnWyheArfjrk9M1oVdLN+tqtspUz915Dn Jq1iG9ZQr3s8ziX5FJe65EFSZ5CWdeHIWKB8fEiKzqaXw3K0nGN7NEay8B1nviVSvv7S 39Aw== X-Gm-Message-State: AO0yUKVUL/0/sWoY5km7enjKA5kwr5PWOLwAbgNb9cjwkIL/raCC3rbW cbpVZxzs6M2OVyh4SMyvkTuJ3ykS6Wt+NDPZ X-Received: by 2002:adf:e7d0:0:b0:2c5:586b:f53d with SMTP id e16-20020adfe7d0000000b002c5586bf53dmr4442166wrn.48.1676313852972; Mon, 13 Feb 2023 10:44:12 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id d7-20020adfe887000000b002c551f7d452sm5849414wrm.98.2023.02.13.10.44.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 13 Feb 2023 10:44:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Eduardo Habkost Cc: qemu-block@nongnu.org, Hu Tao , Gonglei Arei , Richard Henderson , Li Qiang , Thomas Huth , Cao jin , xiaoqiang zhao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow Subject: [PATCH v3 06/14] hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE() Date: Mon, 13 Feb 2023 19:43:30 +0100 Message-Id: <20230213184338.46712-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230213184338.46712-1-philmd@linaro.org> References: <20230213184338.46712-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 IDE_DEVICE() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/qdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 6ae2627a56..1ead62fd18 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -133,7 +133,7 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive) qdev_prop_set_drive_err(dev, "drive", blk_by_legacy_dinfo(drive), &error_fatal); qdev_realize_and_unref(dev, &bus->qbus, &error_fatal); - return DO_UPCAST(IDEDevice, qdev, dev); + return IDE_DEVICE(dev); } int ide_get_geometry(BusState *bus, int unit,