From patchwork Sun Feb 12 22:51:34 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: 652846 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp2124811wrr; Sun, 12 Feb 2023 14:54:36 -0800 (PST) X-Google-Smtp-Source: AK7set9UEeEKAFbPKg52ClVYjJjZHE7gaZ+OPuoUqzIVLNmv+bjMp6g6THMji/EDYg8tv3p8gmyW X-Received: by 2002:ad4:5ecf:0:b0:56e:a96a:2bdc with SMTP id jm15-20020ad45ecf000000b0056ea96a2bdcmr6029866qvb.40.1676242476596; Sun, 12 Feb 2023 14:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676242476; cv=none; d=google.com; s=arc-20160816; b=xI4yiqUct+XKYns+idbWV+b64a0YGZsxiVPz8xSNXk8wIlrP+wwWzigEa6FXTiChsL s+gw3QyEr4dYjjTqu7lW5ncDaERVb7ZJAWUn5GPUATpyk2xH5dgwoW+6wFWZwXmLMClK 6HEZe49c7Few5IfZ5Dx505zs37OVkQmqvvgSRoZxCltPv4HNvkPH+9mBNH4YcpMdkNJo sdCN/ghLLPwOglOOi8fjrU2Gxv0TmwYfu+retxDYmmiI+ImA8smfitS3DOmTJ9tKdGWW rfuFO406elhM1iulFdTY5yzspzZ2O/ebDKhBoyBKxgqlqEQ5NeNvHGqB1q9IHIOfOlN2 kF6A== 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=3aGr4pdXOmnCeHpCx27ssdrfJ2Facg5vKvJw+VkmOyc=; b=CQg16rXWmsM4F44CNvViWtN4KmVIPmfiMJuvnU1lgWV3Ixqf2uqJFBepzbZaPOs0/T YTT75+cXjqRyrUewTDfN9m7vNcCIa4uwhwpypU4QiEz2JE33iiXQQoWFoRiDeJO1uRJr nd2arDrflSNISZPA3EKnloY7R3z21Fz/wnOwvSNPP/y/xNzlOoeGv0H1x2Fu/QB6cnOY lp7PYiTi+yIJJ846Rl338yzMJyDrl5ojAlIpHSrs7KSAYCKRhObHAVKdoV1KtvUmW3w4 /u671y8/TyK35h9mm4NtGnqiOQiTRcAX+SOaEAnuMmIA0xKtBd24YJWYcZ+Lu6/4XvnG jZ6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=keHLgu8I; 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 q19-20020a0ce213000000b0056ea0fb9d6bsi3169732qvl.397.2023.02.12.14.54.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Feb 2023 14:54:36 -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=keHLgu8I; 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 1pRLDA-0006eX-ER; Sun, 12 Feb 2023 17:52:44 -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 1pRLD5-0006Op-O4 for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:52:40 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRLD3-00043y-Lk for qemu-devel@nongnu.org; Sun, 12 Feb 2023 17:52:39 -0500 Received: by mail-wm1-x336.google.com with SMTP id j32-20020a05600c1c2000b003dc4fd6e61dso10054391wms.5 for ; Sun, 12 Feb 2023 14:52:36 -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=3aGr4pdXOmnCeHpCx27ssdrfJ2Facg5vKvJw+VkmOyc=; b=keHLgu8IICaJPgJFolVy95Sxf8QzQL8gMNfJTkr76P7op339ycvDldO9C96kqEtLxy 1A26IwRZTMiROjyHOKE4cwU6YYazWZaz2PQln30P3gR+RaZH73S97rMTyiRWZL/v7wcF CPlK4GMLdX2CellFt4gri6xTAwKJ22nYACBZyReHrXYU3AVh/yGTA2PbOZgAJrUFj2KJ 4ekIUjYZjWcbi92emoqCA7Ql/7u1YIMN/16A3XyAUOHY2j38xpuUP9Jj5hZM0fDejhzh V7Rl+MeurhFU9P3uepAmiO9I2sjK1ZxrKKAyYR3pbqjYAO9cuLi9dppK+N9OhG7lVt2G JN0Q== 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=3aGr4pdXOmnCeHpCx27ssdrfJ2Facg5vKvJw+VkmOyc=; b=6F4AdW0girvMxQUnOdRYdSSv9AUVogOpTInxDmiMaXBEeua/QXTI+XD4qUO8bHuCON c0Bj0DJctG03jEUPftvQJj1/u4cDn7TrJpfycViI87c1URDk2dShBp+b3ZhGoUwQsWus /aruU/82ngxI1iCFu/AVB+0Fi1/0rOYCg37+hBwAGEO1t15DcbazrXKNwTeCZdz5A0v1 Z5q/eD1S4PVlgTexCxdw+J21lHQwDrZUWMekdZCnjyp2cSxRbJt/hGA29HnooknUedrd rCkSOFWZdZO6inUK4A1sONqI56krOGqiPC0ETRm6lZmsqeoexdwQdXajsZ7Hm8lcMh/a BHZQ== X-Gm-Message-State: AO0yUKVUnGE8FWWPyGwqiv2q0hQ63stGVRRF9WYGUKMRYgCs4/HIWfyF zClfj4g9+gga8MX5bwiraJgayw== X-Received: by 2002:a05:600c:1898:b0:3df:f7ba:14e1 with SMTP id x24-20020a05600c189800b003dff7ba14e1mr20043703wmp.8.1676242356380; Sun, 12 Feb 2023 14:52:36 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id e14-20020adfe7ce000000b002c54f367fe4sm4403098wrn.100.2023.02.12.14.52.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 12 Feb 2023 14:52:36 -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?= , Stefan Weil , Jason Wang Subject: [PATCH 09/19] hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO100() Date: Sun, 12 Feb 2023 23:51:34 +0100 Message-Id: <20230212225144.58660-10-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 EEPRO100() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/eepro100.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index dac42ba17b..915935a818 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -1828,7 +1828,7 @@ static const VMStateDescription vmstate_eepro100 = { static void pci_nic_uninit(PCIDevice *pci_dev) { - EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev); + EEPRO100State *s = EEPRO100(pci_dev); vmstate_unregister(VMSTATE_IF(&pci_dev->qdev), s->vmstate, s); g_free(s->vmstate); @@ -1844,7 +1844,7 @@ static NetClientInfo net_eepro100_info = { static void e100_nic_realize(PCIDevice *pci_dev, Error **errp) { - EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev); + EEPRO100State *s = EEPRO100(pci_dev); E100PCIDeviceInfo *info = eepro100_get_class(s); Error *local_err = NULL; @@ -1895,7 +1895,7 @@ static void e100_nic_realize(PCIDevice *pci_dev, Error **errp) static void eepro100_instance_init(Object *obj) { - EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, PCI_DEVICE(obj)); + EEPRO100State *s = EEPRO100(obj); device_add_bootindex_property(obj, &s->conf.bootindex, "bootindex", "/ethernet-phy@0", DEVICE(s));