From nobody Tue Nov 11 00:19:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1559819756; cv=none; d=zoho.com; s=zohoarc; b=m54QtEvNbEr9g+ZOMcI6SvfSb6jlxciK8aZvPKVkEnhub5q5MVJYLAEGZfxVgeYXWZ3K73l7r/03SpUnNHfCHVPmzfNaqLb+86qPYAlj5gqBNpLtyrcF6KYDj9Tj22qW0VQggH4wH8swfD+gvaOWJmU94yWF4VXaLVaAn45XxPg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559819756; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TStSIprlepetv4y+L+FxCKRbcogvNY0bISJmzQgFOuc=; b=Iykai0Iu7MFY6yk5bqQzl7UfMbYp3DqWMsD0tBF82Tiv2uQb4wBycyK8zzS2OurIS50ctLcz52eMNXZ6yshA55YHTetDV6vH8II+hwRX4I5yTBUN4xx/MD2lJqVZJ2YlnmkRS0xGCcz5hicTxJgzhqewOH7YEAxnG+zV6GIWBqo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559819756237267.2263680752758; Thu, 6 Jun 2019 04:15:56 -0700 (PDT) Received: from localhost ([127.0.0.1]:58512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqN9-0007IE-4B for importer@patchew.org; Thu, 06 Jun 2019 07:15:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqFR-0000Sa-2T for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYqFP-0003fm-Vb for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:07:57 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:48335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYqFM-0003XM-8B; Thu, 06 Jun 2019 07:07:52 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MF45G-1hJOpv4BHE-00FVwS; Thu, 06 Jun 2019 13:07:00 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 6 Jun 2019 13:06:22 +0200 Message-Id: <20190606110625.32127-14-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190606110625.32127-1-laurent@vivier.eu> References: <20190606110625.32127-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:fzaLTWynTwDqw6BjWmgpLb2j0IKt7+qM8X08zaQ6i9wGrXiov9X wSpTCy06OGdyElX7Nu4C3qjeTx82I/dXttSwj8u7Um3YjV8hbFFJFfij/5g9aVoTRZMBsgU qRFZL0xYRoujggCov1NFhZcDbnqII1+ueWrGKkHuP6rsAW5OyeZ+lG4bUnfHOe4LlnTqIjF O/l0SKuUv7l8LcvaDxYGg== X-UI-Out-Filterresults: notjunk:1;V03:K0:Hbvzz2t+sbA=:O/5Xg9ZXO9P0MYOLKekIUO 42O8iR3bR2OTpFSjE/mr0VGHbSNoL+DgTUJeZf8rtvpC2oqiQbZGMbj7L5TDfU9RPivEzId1S tQsl5ZlOhBnJQxMT80vywmOoJgoeLDLz32hbMu6fs2w+eOwu5I1Fee2Hc+FBS23MIYWTURf51 tmbHnhTWGWetV1ZmPRGamqojQNd8KznKwpt+le0Qmj0fnW7y+BFc4lxktjt3sDLSQsuYbhBN/ LGKbYA2X/dnvmILr1zYmyEAR/gzKAA5OzgwO1sGjr8suE3Evekh/qOLxDD3zEtE1Zm9q3pYGh 7ftFN6nvFnvZvN+wl5L2LdgZSBKhaX6m1VDIvKy6WWAdNIQWgeYNy4xxE5UhMKGLggTbdQD3o wZEppG7j7ZoVHJp9qw6gS1wtnNYsofIxKWDmnq3dke1b+vb3Qjz3eTuj7tSeDFI8XuqwQ9KEb 39v75ZQggF9F7r0UFwTd/ujaWqvQgzPe80YweWAEzxiZ6RLqkvHSmyxVtK+j+lA72H+8uRLoK w05IjZqJP4RXFYSNvkBHTu6+l8ppc/qG6e1NzPjJoDE8RHXjYWZjxoSSGcpV59W15K2pH6o22 ZTeMQK0dxgXX75rxPLRnqhvjOMlEyOnqasQ3/8+MH/s9mAkhptO2jmWN3SwWRWAhucN4hjCIB jUZYJ/HboaJs+kHcYLgD9NBDSRnwDL5YZucpvfmRZf5sQCcFcpFxgCO5hBqG+JBigvCWc0ZcR ngA0FWEl9uDMvfez9BUfX7onzPQB12WuPnCop8J1c+JrbzPVolK2NnTNJJk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL 13/16] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Dmitry Fleytman , David Hildenbrand , Michael Tokarev , Gerd Hoffmann , Juan Quintela , Aleksandar Rikalo , "Michael S. Tsirkin" , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Yuval Shaia , Alex Williamson , Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-s390x@nongnu.org, Cornelia Huck , Laurent Vivier , qemu-trivial@nongnu.org, Michael Walle , Aleksandar Markovic , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daud=C3=A9 Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl): // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj) Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell . Message-Id: <20190528164020.32250-7-philmd@redhat.com> Signed-off-by: Laurent Vivier --- hw/audio/ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 2265622d44a2..a4e8d99e7775 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1388,7 +1388,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp) pci_register_bar (&s->dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nam); pci_register_bar (&s->dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->io_nabm); AUD_register_card ("ac97", &s->card); - ac97_on_reset (&s->dev.qdev); + ac97_on_reset(DEVICE(s)); } =20 static void ac97_exit(PCIDevice *dev) --=20 2.21.0