From nobody Tue Nov 11 00:18:15 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=1559820247; cv=none; d=zoho.com; s=zohoarc; b=kc+eloN8+y06epIeg80qUYPagJxg+cK1g2mE1xpU0MUe9+LaYT7jVSScLQj9atQ0q2eUt8HYcUR9db56lx7M3d42tQrNj/CyAQxRCAptPxKR8MvN+Lhy64mzTow4LRYmy9k2CyIFUtm3LT3WX5msjlW2hN076iGD8oWYDcw0Jd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559820247; 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=NpfPeAMYRwiJhUhjcgpLHOXK+yHHf/WBYOmHaiOZEVk=; b=YktbUBvoBDxxxv1Gm5mQyXhin1quRPacFIp7fGHX8QvR6gImjcn+aYEp7KWMUz7uBGydJJtZqHpYZ8xE7ntXXTCQeCpUz5YWQCkD7+k+/gr6wlMQQDuW1mS7OC+Uf9VTiWxds1R0eRBmbyYwEZ5Xedt1qXhKiJzoK0/zgFAVZVw= 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 1559820247168347.62859261015205; Thu, 6 Jun 2019 04:24:07 -0700 (PDT) Received: from localhost ([127.0.0.1]:58640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqV4-0005qj-5H for importer@patchew.org; Thu, 06 Jun 2019 07:24:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYqFi-0000k7-Kl for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYqFh-00046k-25 for qemu-devel@nongnu.org; Thu, 06 Jun 2019 07:08:14 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:42439) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYqFc-000418-7N; Thu, 06 Jun 2019 07:08:08 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M5gAG-1hSmUP1wPi-007ET8; Thu, 06 Jun 2019 13:07:03 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 6 Jun 2019 13:06:24 +0200 Message-Id: <20190606110625.32127-16-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:X7Pzqi/mv0dxQQiN8SxrwtJ1RIT5ZhWHO/wg8CR2AcU8Aqcjkys IQILE+MXIMIeW8OZvIlxp20ttU8zBKHg+OHVjimLpwVlLRzkTfABJ3EfPAqZJwvREjbWdgq 0G8lATPj2xwT3lND3J7dZNB0+TVgmZllAOYUegn0R5SO1uKnNG/ALrTPlNsL/kpIu7DghJK Cv57NpSdPF3BCnxkbospg== X-UI-Out-Filterresults: notjunk:1;V03:K0:UJwOZYeoFZE=:1naxc3Kh4Xt1rELgqCD5Bc jDG7R9YIyWEy448OTJSvwueso0oCcp1Wg+5dv9uljp/ODYIVIqYK3qrpoi9GrQ81eQ5e1JQ5Y boUwl/zJwrjii+TKWN7A3/dWo1mTH6/IMXKXRkMRwnaB4J/Lu+78m6yEa6pPlycVETr+IMCem T6u9ZmTGE/Y03DD3zU5XVyJA2c11ivHYZeozqFRepdC5yF+bsFPM/OLTs6L2s5AFMNksRAOx6 GP/HXXDpGfW0mWIY53D5CUbTejUgoZGvu0IiWTIF62btz3LM3huPtP9W0q7MUbPQns1/WpNQ9 FXnGs0gfu2EKEnsYgO3Pv78uaUnRAhSNWIn1eup0WsgqiQO+6TrQwPuPXc+mjzEelX4ZsyIbh IHMoMH55ERH403WeYncRip2pmilDrx4eL1y5OIjzA1IOOMq7XqzTze2es7uxv66wMEJh0HyvG yIb91fELUZP3Z+80NXDzbZFDv5JD665sEG6gPN6zKaKf9swcGkGotbf2zOa5kJc6XpburW5ol Chu8/hf2ZhTykZQcHHplN9ABAywYUaxWa8Z63MqAgCyINNbfFR9IITsdwt9xVF9WFvwVClMnB BeuyEtEARetrZfAVmXJkXiR2X6U897IUP9ISh8kBLqaAXT9NCpEHXBhyoG5V04ui9HfBTLZFc v+iZLp+lgDo1KPqmGN8O3ytdYp2FkPd8+nWadR6oXjG0snJpQonyP89VHgk2LRi7kuuqBE4FA bChtXKsN9soniAqqZ+lNz0Ur9RCX25vs6TVKdeD1WVdaM3ADRPG92BiIL94= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL 15/16] hw/scsi: Use the QOM BUS() macro to access BusState.qbus 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 BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Laurent Vivier Message-Id: <20190528164020.32250-3-philmd@redhat.com> Signed-off-by: Laurent Vivier --- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/mptsas.c | 4 ++-- hw/scsi/virtio-scsi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index da7239d94fcd..a8b7a199f960 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -1860,7 +1860,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, u= int8_t val) } if (val & LSI_SCNTL1_RST) { if (!(s->sstat0 & LSI_SSTAT0_RST)) { - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); s->sstat0 |=3D LSI_SSTAT0_RST; lsi_script_scsi_interrupt(s, LSI_SIST0_RST, 0); } diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c index 929404fb48c8..e800683e91e9 100644 --- a/hw/scsi/mptsas.c +++ b/hw/scsi/mptsas.c @@ -540,7 +540,7 @@ reply_maybe_async: break; =20 case MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS: - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); break; =20 default: @@ -803,7 +803,7 @@ static void mptsas_soft_reset(MPTSASState *s) s->intr_mask =3D MPI_HIM_DIM | MPI_HIM_RIM; mptsas_update_interrupt(s); =20 - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); s->intr_status =3D 0; s->intr_mask =3D save_mask; =20 diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 2994f0738fd8..12d21bbc613c 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -696,7 +696,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev) =20 assert(!s->dataplane_started); s->resetting++; - qbus_reset_all(&s->bus.qbus); + qbus_reset_all(BUS(&s->bus)); s->resetting--; =20 vs->sense_size =3D VIRTIO_SCSI_SENSE_DEFAULT_SIZE; --=20 2.21.0