From patchwork Thu Sep 10 19:48:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D4E6C43461 for ; Thu, 10 Sep 2020 19:50:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBB3921556 for ; Thu, 10 Sep 2020 19:50:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ym1CDDt/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBB3921556 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSaD-0004gw-Qd for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:50:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZO-00036m-1Z for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:44486 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZM-0000Zc-Hm for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gvsBQu3DI4XVEHjUAoI1cF91AFkzecmjdcKRXIM09Is=; b=Ym1CDDt/Mv9TKfML+8U/GENcJKd9DmK5j9zmNIl8I4RHU9go7U7/sh4RpkqPEtL+RL1Tnn Ab/6Vqeu0Hss5puwop9JST+FpWfC2c3wbwEg2crvMWmfEYYYiGE1/1RhkCW75TV0OwRl8I c+5jwW4j/WHr2O0NXuTMTwo7GHjOIgg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-502-wAYbjAnYOYq7YwcULULqNA-1; Thu, 10 Sep 2020 15:49:17 -0400 X-MC-Unique: wAYbjAnYOYq7YwcULULqNA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 05C5E185A0F8; Thu, 10 Sep 2020 19:49:17 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2C547E8FD; Thu, 10 Sep 2020 19:49:10 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 01/18] chardev: Move PARALLEL_CHARDEV macro to common code Date: Thu, 10 Sep 2020 15:48:46 -0400 Message-Id: <20200910194903.4104696-2-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The macro is exactly the same for both Linux and BSD, so move its definition outside the host OS #ifdef blocks. Signed-off-by: Eduardo Habkost --- chardev/char-parallel.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/chardev/char-parallel.c b/chardev/char-parallel.c index 05e7efbd6c..390d03506c 100644 --- a/chardev/char-parallel.c +++ b/chardev/char-parallel.c @@ -47,6 +47,9 @@ #include "chardev/char-fd.h" #include "chardev/char-parallel.h" +#define PARALLEL_CHARDEV(obj) \ + OBJECT_CHECK(ParallelChardev, (obj), TYPE_CHARDEV_PARALLEL) + #if defined(__linux__) typedef struct { @@ -55,9 +58,6 @@ typedef struct { int mode; } ParallelChardev; -#define PARALLEL_CHARDEV(obj) \ - OBJECT_CHECK(ParallelChardev, (obj), TYPE_CHARDEV_PARALLEL) - static int pp_hw_mode(ParallelChardev *s, uint16_t mode) { if (s->mode != mode) { @@ -182,9 +182,6 @@ typedef struct { int fd; } ParallelChardev; -#define PARALLEL_CHARDEV(obj) \ - OBJECT_CHECK(ParallelChardev, (obj), TYPE_CHARDEV_PARALLEL) - static int pp_ioctl(Chardev *chr, int cmd, void *arg) { ParallelChardev *drv = PARALLEL_CHARDEV(chr); From patchwork Thu Sep 10 19:48:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273983 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE569C433E2 for ; Thu, 10 Sep 2020 19:50:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 63A4A221EB for ; Thu, 10 Sep 2020 19:50:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jUN7gcrO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63A4A221EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSaI-0004sS-3y for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:50:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZQ-0003AF-0Z for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:24 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32867 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZO-0000Zg-Eb for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NEbuGLWmXSZT1rnL/wrgI6AbsDI0NcVYdH+yo7NF+Kc=; b=jUN7gcrO/vaVRpzBgUpaX6da7xJd52i+Ebe3IY1hNF0DhGCfVdkwYBRzYPSb+FFTuSOSGY 4+5+BuOfoz57Gdns6Y8DpdtSVTqhBCZDlnWdtkQWJVxOLyf/mg5i6hq2WqMIDMpUldW8UT uw6Gptc24A6v2vgymi5ANAp0fs3AxR0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-OlLIUpCuOIiGicyzktWjAg-1; Thu, 10 Sep 2020 15:49:18 -0400 X-MC-Unique: OlLIUpCuOIiGicyzktWjAg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E8D6E100670D; Thu, 10 Sep 2020 19:49:17 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4D687ED65; Thu, 10 Sep 2020 19:49:17 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 02/18] chardev: Move ParallelChardev typedef to common code Date: Thu, 10 Sep 2020 15:48:47 -0400 Message-Id: <20200910194903.4104696-3-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The struct itself may have a different definition on each OS, but we can define the typedef in common code, outside the host OS #ifdefs. Signed-off-by: Eduardo Habkost --- chardev/char-parallel.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chardev/char-parallel.c b/chardev/char-parallel.c index 390d03506c..e32aa2d226 100644 --- a/chardev/char-parallel.c +++ b/chardev/char-parallel.c @@ -47,16 +47,17 @@ #include "chardev/char-fd.h" #include "chardev/char-parallel.h" +typedef struct ParallelChardev ParallelChardev; #define PARALLEL_CHARDEV(obj) \ OBJECT_CHECK(ParallelChardev, (obj), TYPE_CHARDEV_PARALLEL) #if defined(__linux__) -typedef struct { +struct ParallelChardev { Chardev parent; int fd; int mode; -} ParallelChardev; +}; static int pp_hw_mode(ParallelChardev *s, uint16_t mode) { @@ -177,10 +178,10 @@ static void qemu_chr_open_pp_fd(Chardev *chr, #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -typedef struct { +struct ParallelChardev { Chardev parent; int fd; -} ParallelChardev; +}; static int pp_ioctl(Chardev *chr, int cmd, void *arg) { From patchwork Thu Sep 10 19:48:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305654 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA3E2C433E2 for ; Thu, 10 Sep 2020 19:52:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E818208E4 for ; Thu, 10 Sep 2020 19:52:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WtVMMmPz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E818208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSc7-0000KZ-J6 for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:52:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZW-0003OQ-1P for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:30 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27133 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZU-0000aG-GN for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ajZ80/EMPTUTqKNrGRW+viICgtcnxTZ3M988TIK1x2Y=; b=WtVMMmPzF2GU+knf3D8gsV8scEbod0LOCHjDkVqLWU+VqxEr7t9wiaZNqQ+Bp9fo7MAK65 UpNpC9afrtExcfTtz27G1Sfhpba+dI/+KdTCq8J5M6sDXYHcvGYyJVxnWHKUFcxVCl53AB bkRKWtuVGaDG1PLnT7EcrKEJvnpw8WA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-t3LgQ-1eMc2Knm5ZLtLOzA-1; Thu, 10 Sep 2020 15:49:25 -0400 X-MC-Unique: t3LgQ-1eMc2Knm5ZLtLOzA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E0471801AB7; Thu, 10 Sep 2020 19:49:24 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C9D57EB74; Thu, 10 Sep 2020 19:49:18 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 03/18] chardev: Use DECLARE_INSTANCE_CHECKER macro for PARALLEL_CHARDEV Date: Thu, 10 Sep 2020 15:48:48 -0400 Message-Id: <20200910194903.4104696-4-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Use DECLARE_INSTANCE_CHECKER instead of manually defining the instance type checking macro. Signed-off-by: Eduardo Habkost --- chardev/char-parallel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-parallel.c b/chardev/char-parallel.c index e32aa2d226..3d670bcb1d 100644 --- a/chardev/char-parallel.c +++ b/chardev/char-parallel.c @@ -48,8 +48,8 @@ #include "chardev/char-parallel.h" typedef struct ParallelChardev ParallelChardev; -#define PARALLEL_CHARDEV(obj) \ - OBJECT_CHECK(ParallelChardev, (obj), TYPE_CHARDEV_PARALLEL) +DECLARE_INSTANCE_CHECKER(ParallelChardev, PARALLEL_CHARDEV, + TYPE_CHARDEV_PARALLEL) #if defined(__linux__) From patchwork Thu Sep 10 19:48:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA467C433E2 for ; Thu, 10 Sep 2020 19:50:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94E05208E4 for ; Thu, 10 Sep 2020 19:50:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VfGcX69L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94E05208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSaZ-0005YL-JQ for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZd-0003gb-Ae for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:37 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:25573 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZb-0000ad-BU for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z/LWhJt78DIlQuX716+Xlg+qW9v9IeHJblIBLpCOQpc=; b=VfGcX69LeS28s5O70c3R1Fs+kxb1DrCZIpcuOAXrV7Fm/MSiwszVhtsfu9GsOSr0B9g+lO Z1zTGtpNud1xJHfIlejeBpMFZ5VL990EFSu0i2ya3pFM8jukZgmt2pcR28G8r5SND43yYx WMHXzHoUIkkfZvc5BvXPRNJWLHwt/bU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-pLKoXy7AOcCB2TgCh48p4g-1; Thu, 10 Sep 2020 15:49:33 -0400 X-MC-Unique: pLKoXy7AOcCB2TgCh48p4g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EF5A22FD04; Thu, 10 Sep 2020 19:49:31 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCE9819C4F; Thu, 10 Sep 2020 19:49:25 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 04/18] chardev: Rename MOUSE_CHARDEV to CHARDEV_MSMOUSE Date: Thu, 10 Sep 2020 15:48:49 -0400 Message-Id: <20200910194903.4104696-5-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_MSMOUSE constant name and the QOM type name string ("chardev-msmouse"). Signed-off-by: Eduardo Habkost --- chardev/msmouse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chardev/msmouse.c b/chardev/msmouse.c index eb9231dcdb..5cc3055c53 100644 --- a/chardev/msmouse.c +++ b/chardev/msmouse.c @@ -45,12 +45,12 @@ struct MouseChardev { typedef struct MouseChardev MouseChardev; #define TYPE_CHARDEV_MSMOUSE "chardev-msmouse" -DECLARE_INSTANCE_CHECKER(MouseChardev, MOUSE_CHARDEV, +DECLARE_INSTANCE_CHECKER(MouseChardev, CHARDEV_MSMOUSE, TYPE_CHARDEV_MSMOUSE) static void msmouse_chr_accept_input(Chardev *chr) { - MouseChardev *mouse = MOUSE_CHARDEV(chr); + MouseChardev *mouse = CHARDEV_MSMOUSE(chr); int len; len = qemu_chr_be_can_write(chr); @@ -105,7 +105,7 @@ static void msmouse_queue_event(MouseChardev *mouse) static void msmouse_input_event(DeviceState *dev, QemuConsole *src, InputEvent *evt) { - MouseChardev *mouse = MOUSE_CHARDEV(dev); + MouseChardev *mouse = CHARDEV_MSMOUSE(dev); InputMoveEvent *move; InputBtnEvent *btn; @@ -129,7 +129,7 @@ static void msmouse_input_event(DeviceState *dev, QemuConsole *src, static void msmouse_input_sync(DeviceState *dev) { - MouseChardev *mouse = MOUSE_CHARDEV(dev); + MouseChardev *mouse = CHARDEV_MSMOUSE(dev); Chardev *chr = CHARDEV(dev); msmouse_queue_event(mouse); @@ -144,7 +144,7 @@ static int msmouse_chr_write(struct Chardev *s, const uint8_t *buf, int len) static void char_msmouse_finalize(Object *obj) { - MouseChardev *mouse = MOUSE_CHARDEV(obj); + MouseChardev *mouse = CHARDEV_MSMOUSE(obj); qemu_input_handler_unregister(mouse->hs); } @@ -161,7 +161,7 @@ static void msmouse_chr_open(Chardev *chr, bool *be_opened, Error **errp) { - MouseChardev *mouse = MOUSE_CHARDEV(chr); + MouseChardev *mouse = CHARDEV_MSMOUSE(chr); *be_opened = false; mouse->hs = qemu_input_handler_register((DeviceState *)mouse, From patchwork Thu Sep 10 19:48:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305653 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC7D1C43461 for ; Thu, 10 Sep 2020 19:53:28 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 259A2208E4 for ; Thu, 10 Sep 2020 19:53:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="R3/wJOSE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 259A2208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSdL-00037m-6o for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:53:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZj-0003sp-SN for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:43 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54013 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZi-0000b7-86 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=USh04D7GmPodeLCrUnBGKkPOXZRTk4QbeK/nTmu9mxc=; b=R3/wJOSEEehyBU2GLBesp672HLpRhTuTq2FeWYM/p1XtdkW8DWzsvS+qrTyOhrKGLNtNAc aqf990ZUPR+upNzZA8ekAlQS7K1Wj6yYf3c3tQGRGggPXLJXoI6BxfHyFTvoHPZKC7PjRe Jijg6PjEHYBvLP62pjltxu6eoE586UM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-_nTRV3HTMDyq6zgsLBAGAA-1; Thu, 10 Sep 2020 15:49:39 -0400 X-MC-Unique: _nTRV3HTMDyq6zgsLBAGAA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E55CA100746F; Thu, 10 Sep 2020 19:49:38 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB4CD7E8F9; Thu, 10 Sep 2020 19:49:32 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 05/18] chardev: Rename BAUM_CHARDEV to CHARDEV_BRAILLE Date: Thu, 10 Sep 2020 15:48:50 -0400 Message-Id: <20200910194903.4104696-6-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:35:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_BRAILLE constant name and the QOM type name string ("chardev-braille"). Signed-off-by: Eduardo Habkost --- chardev/baum.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chardev/baum.c b/chardev/baum.c index 5deca778bc..48459bd73c 100644 --- a/chardev/baum.c +++ b/chardev/baum.c @@ -105,7 +105,7 @@ struct BaumChardev { typedef struct BaumChardev BaumChardev; #define TYPE_CHARDEV_BRAILLE "chardev-braille" -DECLARE_INSTANCE_CHECKER(BaumChardev, BAUM_CHARDEV, +DECLARE_INSTANCE_CHECKER(BaumChardev, CHARDEV_BRAILLE, TYPE_CHARDEV_BRAILLE) /* Let's assume NABCC by default */ @@ -269,7 +269,7 @@ static int baum_deferred_init(BaumChardev *baum) /* The serial port can receive more of our data */ static void baum_chr_accept_input(struct Chardev *chr) { - BaumChardev *baum = BAUM_CHARDEV(chr); + BaumChardev *baum = CHARDEV_BRAILLE(chr); int room, first; if (!baum->out_buf_used) @@ -336,7 +336,7 @@ static void baum_write_packet(BaumChardev *baum, const uint8_t *buf, int len) /* Called when the other end seems to have a wrong idea of our display size */ static void baum_cellCount_timer_cb(void *opaque) { - BaumChardev *baum = BAUM_CHARDEV(opaque); + BaumChardev *baum = CHARDEV_BRAILLE(opaque); uint8_t cell_count[] = { BAUM_RSP_CellCount, baum->x * baum->y }; DPRINTF("Timeout waiting for DisplayData, sending cell count\n"); baum_write_packet(baum, cell_count, sizeof(cell_count)); @@ -486,7 +486,7 @@ static int baum_eat_packet(BaumChardev *baum, const uint8_t *buf, int len) /* The other end is writing some data. Store it and try to interpret */ static int baum_chr_write(Chardev *chr, const uint8_t *buf, int len) { - BaumChardev *baum = BAUM_CHARDEV(chr); + BaumChardev *baum = CHARDEV_BRAILLE(chr); int tocopy, cur, eaten, orig_len = len; if (!len) @@ -543,7 +543,7 @@ static void baum_send_key2(BaumChardev *baum, uint8_t type, uint8_t value, /* We got some data on the BrlAPI socket */ static void baum_chr_read(void *opaque) { - BaumChardev *baum = BAUM_CHARDEV(opaque); + BaumChardev *baum = CHARDEV_BRAILLE(opaque); brlapi_keyCode_t code; int ret; if (!baum->brlapi) @@ -629,7 +629,7 @@ static void baum_chr_read(void *opaque) static void char_braille_finalize(Object *obj) { - BaumChardev *baum = BAUM_CHARDEV(obj); + BaumChardev *baum = CHARDEV_BRAILLE(obj); timer_free(baum->cellCount_timer); if (baum->brlapi) { @@ -643,7 +643,7 @@ static void baum_chr_open(Chardev *chr, bool *be_opened, Error **errp) { - BaumChardev *baum = BAUM_CHARDEV(chr); + BaumChardev *baum = CHARDEV_BRAILLE(chr); brlapi_handle_t *handle; handle = g_malloc0(brlapi_getHandleSize()); From patchwork Thu Sep 10 19:48:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273981 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3DDBC43461 for ; Thu, 10 Sep 2020 19:52:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D0AB208E4 for ; Thu, 10 Sep 2020 19:52:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LmCLHJb3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D0AB208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGScM-00011m-Ac for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:52:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZl-0003vO-21 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:45 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:25426 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZj-0000bC-AB for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8jZLnLTQJNdWJTI+v3xFFNgHXfxyVCGfTNuu+LgRjlk=; b=LmCLHJb3B66Ytv2uWltUH/bseXWvvmPOQsWG6iJX1vDWgDOj0MbI0uyHzb3KdQ+uoDyBlB ShbHJc2rlX5S1Jn13wIqb5FzUQRNvs24+Zcu+oWjKWoOPkAbROm91JqQrvfkYPXPKKtOEw gOVa0jz79EjdQfA1EMFWqfgMgEB15mE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-HEo0YXVhPIG2tGypR0Kb3g-1; Thu, 10 Sep 2020 15:49:40 -0400 X-MC-Unique: HEo0YXVhPIG2tGypR0Kb3g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF160801AF2; Thu, 10 Sep 2020 19:49:39 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 968E97E8F9; Thu, 10 Sep 2020 19:49:39 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 06/18] chardev: Rename FD_CHARDEV to CHARDEV_FD Date: Thu, 10 Sep 2020 15:48:51 -0400 Message-Id: <20200910194903.4104696-7-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- include/chardev/char-fd.h | 2 +- chardev/char-fd.c | 14 +++++++------- chardev/char-serial.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/chardev/char-fd.h b/include/chardev/char-fd.h index 9de0e440de..707f7f1700 100644 --- a/include/chardev/char-fd.h +++ b/include/chardev/char-fd.h @@ -38,7 +38,7 @@ typedef struct FDChardev FDChardev; #define TYPE_CHARDEV_FD "chardev-fd" -DECLARE_INSTANCE_CHECKER(FDChardev, FD_CHARDEV, +DECLARE_INSTANCE_CHECKER(FDChardev, CHARDEV_FD, TYPE_CHARDEV_FD) void qemu_chr_open_fd(Chardev *chr, int fd_in, int fd_out); diff --git a/chardev/char-fd.c b/chardev/char-fd.c index c2d8101106..b1701c4e4a 100644 --- a/chardev/char-fd.c +++ b/chardev/char-fd.c @@ -36,7 +36,7 @@ /* Called with chr_write_lock held. */ static int fd_chr_write(Chardev *chr, const uint8_t *buf, int len) { - FDChardev *s = FD_CHARDEV(chr); + FDChardev *s = CHARDEV_FD(chr); return io_channel_send(s->ioc_out, buf, len); } @@ -44,7 +44,7 @@ static int fd_chr_write(Chardev *chr, const uint8_t *buf, int len) static gboolean fd_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) { Chardev *chr = CHARDEV(opaque); - FDChardev *s = FD_CHARDEV(opaque); + FDChardev *s = CHARDEV_FD(opaque); int len; uint8_t buf[CHR_READ_BUF_LEN]; ssize_t ret; @@ -74,7 +74,7 @@ static gboolean fd_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) static int fd_chr_read_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - FDChardev *s = FD_CHARDEV(opaque); + FDChardev *s = CHARDEV_FD(opaque); s->max_size = qemu_chr_be_can_write(chr); return s->max_size; @@ -82,13 +82,13 @@ static int fd_chr_read_poll(void *opaque) static GSource *fd_chr_add_watch(Chardev *chr, GIOCondition cond) { - FDChardev *s = FD_CHARDEV(chr); + FDChardev *s = CHARDEV_FD(chr); return qio_channel_create_watch(s->ioc_out, cond); } static void fd_chr_update_read_handler(Chardev *chr) { - FDChardev *s = FD_CHARDEV(chr); + FDChardev *s = CHARDEV_FD(chr); remove_fd_in_watch(chr); if (s->ioc_in) { @@ -102,7 +102,7 @@ static void fd_chr_update_read_handler(Chardev *chr) static void char_fd_finalize(Object *obj) { Chardev *chr = CHARDEV(obj); - FDChardev *s = FD_CHARDEV(obj); + FDChardev *s = CHARDEV_FD(obj); remove_fd_in_watch(chr); if (s->ioc_in) { @@ -130,7 +130,7 @@ int qmp_chardev_open_file_source(char *src, int flags, Error **errp) void qemu_chr_open_fd(Chardev *chr, int fd_in, int fd_out) { - FDChardev *s = FD_CHARDEV(chr); + FDChardev *s = CHARDEV_FD(chr); char *name; s->ioc_in = QIO_CHANNEL(qio_channel_file_new_fd(fd_in)); diff --git a/chardev/char-serial.c b/chardev/char-serial.c index 7c3d84ae24..de1705d2a8 100644 --- a/chardev/char-serial.c +++ b/chardev/char-serial.c @@ -178,7 +178,7 @@ static void tty_serial_init(int fd, int speed, static int tty_serial_ioctl(Chardev *chr, int cmd, void *arg) { - FDChardev *s = FD_CHARDEV(chr); + FDChardev *s = CHARDEV_FD(chr); QIOChannelFile *fioc = QIO_CHANNEL_FILE(s->ioc_in); switch (cmd) { From patchwork Thu Sep 10 19:48:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273978 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5585BC43461 for ; Thu, 10 Sep 2020 19:56:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01D4A21D92 for ; Thu, 10 Sep 2020 19:56:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Qh8de0zi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 01D4A21D92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSfu-0007mo-4q for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSZu-0004ML-G7 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:54 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:50139 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZs-0000bm-Lj for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:49:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rX4kafdmfGZKxi2RxomZg4CDzZ1oTRFgvM+T8+rbqIs=; b=Qh8de0zikLcfdZTck9pojH36uvMwL7gIChAjUy2KQ296n00A5DXG/mJNrtC4NpuBlI3ioP euEB+D6IQM0LrGF7LCABVhqKuaAdbezL0Ie9Fbxa+MUfqOE6tKV+xqAZIXvHIG9hHF87JE vygpu9ktWEliNldVBRgtA6bfxeH9Kf0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-513-NXE0ar2EMg6j0XI-tD_zpQ-1; Thu, 10 Sep 2020 15:49:50 -0400 X-MC-Unique: NXE0ar2EMg6j0XI-tD_zpQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A49E107465B; Thu, 10 Sep 2020 19:49:49 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2A017EB7A; Thu, 10 Sep 2020 19:49:40 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 07/18] chardev: Rename MUX_CHARDEV to CHARDEV_MUX Date: Thu, 10 Sep 2020 15:48:52 -0400 Message-Id: <20200910194903.4104696-8-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/chardev-internal.h | 2 +- chardev/char-fe.c | 4 ++-- chardev/char-mux.c | 22 +++++++++++----------- chardev/char.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h index aba0240759..740d56bf94 100644 --- a/chardev/chardev-internal.h +++ b/chardev/chardev-internal.h @@ -54,7 +54,7 @@ struct MuxChardev { }; typedef struct MuxChardev MuxChardev; -DECLARE_INSTANCE_CHECKER(MuxChardev, MUX_CHARDEV, +DECLARE_INSTANCE_CHECKER(MuxChardev, CHARDEV_MUX, TYPE_CHARDEV_MUX) #define CHARDEV_IS_MUX(chr) \ object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX) diff --git a/chardev/char-fe.c b/chardev/char-fe.c index 474715c5a9..419835c340 100644 --- a/chardev/char-fe.c +++ b/chardev/char-fe.c @@ -196,7 +196,7 @@ bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp) if (s) { if (CHARDEV_IS_MUX(s)) { - MuxChardev *d = MUX_CHARDEV(s); + MuxChardev *d = CHARDEV_MUX(s); if (d->mux_cnt >= MAX_MUX) { goto unavailable; @@ -231,7 +231,7 @@ void qemu_chr_fe_deinit(CharBackend *b, bool del) b->chr->be = NULL; } if (CHARDEV_IS_MUX(b->chr)) { - MuxChardev *d = MUX_CHARDEV(b->chr); + MuxChardev *d = CHARDEV_MUX(b->chr); d->backends[b->tag] = NULL; } if (del) { diff --git a/chardev/char-mux.c b/chardev/char-mux.c index 6f980bb836..a9dcbf2cc0 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -36,7 +36,7 @@ /* Called with chr_write_lock held. */ static int mux_chr_write(Chardev *chr, const uint8_t *buf, int len) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); int ret; if (!d->timestamps) { ret = qemu_chr_fe_write(&d->chr, buf, len); @@ -128,7 +128,7 @@ static void mux_chr_send_event(MuxChardev *d, int mux_nr, QEMUChrEvent event) static void mux_chr_be_event(Chardev *chr, QEMUChrEvent event) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); if (d->focus != -1) { mux_chr_send_event(d, d->focus, event); @@ -182,7 +182,7 @@ static int mux_proc_byte(Chardev *chr, MuxChardev *d, int ch) static void mux_chr_accept_input(Chardev *chr) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); int m = d->focus; CharBackend *be = d->backends[m]; @@ -195,7 +195,7 @@ static void mux_chr_accept_input(Chardev *chr) static int mux_chr_can_read(void *opaque) { - MuxChardev *d = MUX_CHARDEV(opaque); + MuxChardev *d = CHARDEV_MUX(opaque); int m = d->focus; CharBackend *be = d->backends[m]; @@ -213,7 +213,7 @@ static int mux_chr_can_read(void *opaque) static void mux_chr_read(void *opaque, const uint8_t *buf, int size) { Chardev *chr = CHARDEV(opaque); - MuxChardev *d = MUX_CHARDEV(opaque); + MuxChardev *d = CHARDEV_MUX(opaque); int m = d->focus; CharBackend *be = d->backends[m]; int i; @@ -234,7 +234,7 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size) void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); int i; if (!machine_init_done) { @@ -254,7 +254,7 @@ static void mux_chr_event(void *opaque, QEMUChrEvent event) static GSource *mux_chr_add_watch(Chardev *s, GIOCondition cond) { - MuxChardev *d = MUX_CHARDEV(s); + MuxChardev *d = CHARDEV_MUX(s); Chardev *chr = qemu_chr_fe_get_driver(&d->chr); ChardevClass *cc = CHARDEV_GET_CLASS(chr); @@ -267,7 +267,7 @@ static GSource *mux_chr_add_watch(Chardev *s, GIOCondition cond) static void char_mux_finalize(Object *obj) { - MuxChardev *d = MUX_CHARDEV(obj); + MuxChardev *d = CHARDEV_MUX(obj); int i; for (i = 0; i < d->mux_cnt; i++) { @@ -281,7 +281,7 @@ static void char_mux_finalize(Object *obj) static void mux_chr_update_read_handlers(Chardev *chr) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); /* Fix up the real driver with mux routines */ qemu_chr_fe_set_handlers_full(&d->chr, @@ -295,7 +295,7 @@ static void mux_chr_update_read_handlers(Chardev *chr) void mux_set_focus(Chardev *chr, int focus) { - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); assert(focus >= 0); assert(focus < d->mux_cnt); @@ -316,7 +316,7 @@ static void qemu_chr_open_mux(Chardev *chr, { ChardevMux *mux = backend->u.mux.data; Chardev *drv; - MuxChardev *d = MUX_CHARDEV(chr); + MuxChardev *d = CHARDEV_MUX(chr); drv = qemu_chr_find(mux->chardev); if (drv == NULL) { diff --git a/chardev/char.c b/chardev/char.c index 77e7ec814f..43fb8bd50e 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -308,7 +308,7 @@ static const TypeInfo char_type_info = { static bool qemu_chr_is_busy(Chardev *s) { if (CHARDEV_IS_MUX(s)) { - MuxChardev *d = MUX_CHARDEV(s); + MuxChardev *d = CHARDEV_MUX(s); return d->mux_cnt >= 0; } else { return s->be != NULL; From patchwork Thu Sep 10 19:48:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273982 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92C21C433E2 for ; Thu, 10 Sep 2020 19:52:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 169A4208E4 for ; Thu, 10 Sep 2020 19:52:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NJjOPZv1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 169A4208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSc3-000081-23 for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:52:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSa2-0004jf-BK for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49453) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSZz-0000cF-TH for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/DVmnWXbjfp4IFN03k1SQobCGFF9J4I2dpJoYqkax8Q=; b=NJjOPZv19b44s/AWelyUM3CI5yaucVQa+uflWx5O2jjB/eZg7PiKz1N6ivHHAW/dNS/T+8 Ed6bS+5iS9rhYaLjZuX0TrRIBPrwm6wWyuS/toJLh42C/DL7LbupcNlVkSXy/xPM/id+5l VjL7BeKhdiorLSFEck2BoIpOJmla79U= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-3Fb4d7tGM_a1Wwq9NuLMLg-1; Thu, 10 Sep 2020 15:49:57 -0400 X-MC-Unique: 3Fb4d7tGM_a1Wwq9NuLMLg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1DA958CCC24; Thu, 10 Sep 2020 19:49:56 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4090819C4F; Thu, 10 Sep 2020 19:49:50 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 08/18] chardev: Rename PARALLEL_CHARDEV to CHARDEV_PARALLEL Date: Thu, 10 Sep 2020 15:48:53 -0400 Message-Id: <20200910194903.4104696-9-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-parallel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chardev/char-parallel.c b/chardev/char-parallel.c index 3d670bcb1d..7ab19339c7 100644 --- a/chardev/char-parallel.c +++ b/chardev/char-parallel.c @@ -48,7 +48,7 @@ #include "chardev/char-parallel.h" typedef struct ParallelChardev ParallelChardev; -DECLARE_INSTANCE_CHECKER(ParallelChardev, PARALLEL_CHARDEV, +DECLARE_INSTANCE_CHECKER(ParallelChardev, CHARDEV_PARALLEL, TYPE_CHARDEV_PARALLEL) #if defined(__linux__) @@ -73,7 +73,7 @@ static int pp_hw_mode(ParallelChardev *s, uint16_t mode) static int pp_ioctl(Chardev *chr, int cmd, void *arg) { - ParallelChardev *drv = PARALLEL_CHARDEV(chr); + ParallelChardev *drv = CHARDEV_PARALLEL(chr); int fd = drv->fd; uint8_t b; @@ -163,7 +163,7 @@ static void qemu_chr_open_pp_fd(Chardev *chr, bool *be_opened, Error **errp) { - ParallelChardev *drv = PARALLEL_CHARDEV(chr); + ParallelChardev *drv = CHARDEV_PARALLEL(chr); if (ioctl(fd, PPCLAIM) < 0) { error_setg_errno(errp, errno, "not a parallel port"); @@ -185,7 +185,7 @@ struct ParallelChardev { static int pp_ioctl(Chardev *chr, int cmd, void *arg) { - ParallelChardev *drv = PARALLEL_CHARDEV(chr); + ParallelChardev *drv = CHARDEV_PARALLEL(chr); uint8_t b; switch (cmd) { @@ -230,7 +230,7 @@ static void qemu_chr_open_pp_fd(Chardev *chr, bool *be_opened, Error **errp) { - ParallelChardev *drv = PARALLEL_CHARDEV(chr); + ParallelChardev *drv = CHARDEV_PARALLEL(chr); drv->fd = fd; *be_opened = false; } @@ -286,7 +286,7 @@ static void char_parallel_finalize(Object *obj) { #if defined(__linux__) Chardev *chr = CHARDEV(obj); - ParallelChardev *drv = PARALLEL_CHARDEV(chr); + ParallelChardev *drv = CHARDEV_PARALLEL(chr); int fd = drv->fd; pp_hw_mode(drv, IEEE1284_MODE_COMPAT); From patchwork Thu Sep 10 19:48:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273980 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09E30C433E2 for ; Thu, 10 Sep 2020 19:53:40 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 980A4208E4 for ; Thu, 10 Sep 2020 19:53:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GdnEgjja" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 980A4208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSdW-0003ZK-L5 for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:53:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSa3-0004m3-3w for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:03 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:40081 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSa1-0000cO-5N for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tO1cF4uLddeS/rfTwEY8zoXQ+27FQblhXU4hYJJCTzo=; b=GdnEgjja+HSS5RFY6t5cyq0r2dLZi0KG0EXKMQO2wjOL1JXSIbZYoKkaWkvM16+v1xL9dY OkyqmbJpFZrdckE7OgUg0wPxxTm4NkRj75Iu5XHxdWbJZ0ehpeRmjVFXedvUvMimaUgSd5 H0dR/gXiChOxpZ4OIKfXC5qQIBY2R14= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-451-WF6L2t5vMvGKhAiply5Tlg-1; Thu, 10 Sep 2020 15:49:58 -0400 X-MC-Unique: WF6L2t5vMvGKhAiply5Tlg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 763FB1007B00; Thu, 10 Sep 2020 19:49:57 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38FF37EB7A; Thu, 10 Sep 2020 19:49:57 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 09/18] chardev: Rename PTY_CHARDEV to CHARDEV_PTY Date: Thu, 10 Sep 2020 15:48:54 -0400 Message-Id: <20200910194903.4104696-10-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:35:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-pty.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index a2d1e7c985..4c1c877097 100644 --- a/chardev/char-pty.c +++ b/chardev/char-pty.c @@ -45,7 +45,7 @@ struct PtyChardev { }; typedef struct PtyChardev PtyChardev; -DECLARE_INSTANCE_CHECKER(PtyChardev, PTY_CHARDEV, +DECLARE_INSTANCE_CHECKER(PtyChardev, CHARDEV_PTY, TYPE_CHARDEV_PTY) static void pty_chr_state(Chardev *chr, int connected); @@ -62,7 +62,7 @@ static void pty_chr_timer_cancel(PtyChardev *s) static gboolean pty_chr_timer(gpointer opaque) { struct Chardev *chr = CHARDEV(opaque); - PtyChardev *s = PTY_CHARDEV(opaque); + PtyChardev *s = CHARDEV_PTY(opaque); pty_chr_timer_cancel(s); if (!s->connected) { @@ -74,7 +74,7 @@ static gboolean pty_chr_timer(gpointer opaque) static void pty_chr_rearm_timer(Chardev *chr, int ms) { - PtyChardev *s = PTY_CHARDEV(chr); + PtyChardev *s = CHARDEV_PTY(chr); char *name; pty_chr_timer_cancel(s); @@ -86,7 +86,7 @@ static void pty_chr_rearm_timer(Chardev *chr, int ms) static void pty_chr_update_read_handler(Chardev *chr) { - PtyChardev *s = PTY_CHARDEV(chr); + PtyChardev *s = CHARDEV_PTY(chr); GPollFD pfd; int rc; QIOChannelFile *fioc = QIO_CHANNEL_FILE(s->ioc); @@ -108,7 +108,7 @@ static void pty_chr_update_read_handler(Chardev *chr) static int char_pty_chr_write(Chardev *chr, const uint8_t *buf, int len) { - PtyChardev *s = PTY_CHARDEV(chr); + PtyChardev *s = CHARDEV_PTY(chr); if (!s->connected) { return len; @@ -118,7 +118,7 @@ static int char_pty_chr_write(Chardev *chr, const uint8_t *buf, int len) static GSource *pty_chr_add_watch(Chardev *chr, GIOCondition cond) { - PtyChardev *s = PTY_CHARDEV(chr); + PtyChardev *s = CHARDEV_PTY(chr); if (!s->connected) { return NULL; } @@ -128,7 +128,7 @@ static GSource *pty_chr_add_watch(Chardev *chr, GIOCondition cond) static int pty_chr_read_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - PtyChardev *s = PTY_CHARDEV(opaque); + PtyChardev *s = CHARDEV_PTY(opaque); s->read_bytes = qemu_chr_be_can_write(chr); return s->read_bytes; @@ -137,7 +137,7 @@ static int pty_chr_read_poll(void *opaque) static gboolean pty_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) { Chardev *chr = CHARDEV(opaque); - PtyChardev *s = PTY_CHARDEV(opaque); + PtyChardev *s = CHARDEV_PTY(opaque); gsize len; uint8_t buf[CHR_READ_BUF_LEN]; ssize_t ret; @@ -162,7 +162,7 @@ static gboolean pty_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) static void pty_chr_state(Chardev *chr, int connected) { - PtyChardev *s = PTY_CHARDEV(chr); + PtyChardev *s = CHARDEV_PTY(chr); if (!connected) { remove_fd_in_watch(chr); @@ -189,7 +189,7 @@ static void pty_chr_state(Chardev *chr, int connected) static void char_pty_finalize(Object *obj) { Chardev *chr = CHARDEV(obj); - PtyChardev *s = PTY_CHARDEV(obj); + PtyChardev *s = CHARDEV_PTY(obj); pty_chr_state(chr, 0); object_unref(OBJECT(s->ioc)); @@ -220,7 +220,7 @@ static void char_pty_open(Chardev *chr, qemu_printf("char device redirected to %s (label %s)\n", pty_name, chr->label); - s = PTY_CHARDEV(chr); + s = CHARDEV_PTY(chr); s->ioc = QIO_CHANNEL(qio_channel_file_new_fd(master_fd)); name = g_strdup_printf("chardev-pty-%s", chr->label); qio_channel_set_name(QIO_CHANNEL(s->ioc), name); From patchwork Thu Sep 10 19:48:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 420E4C43461 for ; Thu, 10 Sep 2020 19:55:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB73A2076D for ; Thu, 10 Sep 2020 19:55:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Du8jIMZj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB73A2076D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSfK-0006wC-1b for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:55:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSa4-0004oc-0G for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:04 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:45005 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSa2-0000ca-7m for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yDSkuYKlOtfIM7UvBv7kRTHyikTp8v/R6T39bDeWySg=; b=Du8jIMZjQDGX1yNgwj/OsqnYA36opPfIPl+CUCfurhioFwkiNGoBTvvKHgd6ke/m/2TQTY IYMEdFrvXPotzxRjj6u09iWSV0hK6b22ZoBNG5uxohTV4X4GqEdb04OtZ21/OsCbE5HxDM qrO6fm0mu38zcQil6pByTzOPwBfgugg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-433-sFCDlwQJP2qq1JRLs-_UhA-1; Thu, 10 Sep 2020 15:49:59 -0400 X-MC-Unique: sFCDlwQJP2qq1JRLs-_UhA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 741148CCC31; Thu, 10 Sep 2020 19:49:58 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B3C719C66; Thu, 10 Sep 2020 19:49:58 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 10/18] chardev: Rename RINGBUF_CHARDEV to CHARDEV_RINGBUF Date: Thu, 10 Sep 2020 15:48:55 -0400 Message-Id: <20200910194903.4104696-11-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-ringbuf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chardev/char-ringbuf.c b/chardev/char-ringbuf.c index d40d21d3cf..8d2916cd78 100644 --- a/chardev/char-ringbuf.c +++ b/chardev/char-ringbuf.c @@ -42,19 +42,19 @@ struct RingBufChardev { }; typedef struct RingBufChardev RingBufChardev; -DECLARE_INSTANCE_CHECKER(RingBufChardev, RINGBUF_CHARDEV, +DECLARE_INSTANCE_CHECKER(RingBufChardev, CHARDEV_RINGBUF, TYPE_CHARDEV_RINGBUF) static size_t ringbuf_count(const Chardev *chr) { - const RingBufChardev *d = RINGBUF_CHARDEV(chr); + const RingBufChardev *d = CHARDEV_RINGBUF(chr); return d->prod - d->cons; } static int ringbuf_chr_write(Chardev *chr, const uint8_t *buf, int len) { - RingBufChardev *d = RINGBUF_CHARDEV(chr); + RingBufChardev *d = CHARDEV_RINGBUF(chr); int i; if (!buf || (len < 0)) { @@ -73,7 +73,7 @@ static int ringbuf_chr_write(Chardev *chr, const uint8_t *buf, int len) static int ringbuf_chr_read(Chardev *chr, uint8_t *buf, int len) { - RingBufChardev *d = RINGBUF_CHARDEV(chr); + RingBufChardev *d = CHARDEV_RINGBUF(chr); int i; qemu_mutex_lock(&chr->chr_write_lock); @@ -87,7 +87,7 @@ static int ringbuf_chr_read(Chardev *chr, uint8_t *buf, int len) static void char_ringbuf_finalize(Object *obj) { - RingBufChardev *d = RINGBUF_CHARDEV(obj); + RingBufChardev *d = CHARDEV_RINGBUF(obj); g_free(d->cbuf); } @@ -98,7 +98,7 @@ static void qemu_chr_open_ringbuf(Chardev *chr, Error **errp) { ChardevRingbuf *opts = backend->u.ringbuf.data; - RingBufChardev *d = RINGBUF_CHARDEV(chr); + RingBufChardev *d = CHARDEV_RINGBUF(chr); d->size = opts->has_size ? opts->size : 65536; From patchwork Thu Sep 10 19:48:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63A06C2D0A7 for ; Thu, 10 Sep 2020 19:55:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A624D208E4 for ; Thu, 10 Sep 2020 19:55:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QETrhhnL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A624D208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSfN-0006x0-Lx for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSa6-0004vP-1w for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:06 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:38940 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSa3-0000co-OF for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZOcCIlgtYTbBYD+qGN6JUOF4pxhSN6iGYRbBWA82UkE=; b=QETrhhnLInQaoEeRs5QJyyXoRJf6jBVWJ79QlJWt5DNMpEMBr9egjH72ba7ZTgCR7uLuts bi2zFtdawfO1BjhH3gO4ZZOMDVet6Oh9QfkGQ5jvRa2JW0B+glMBlSn9PnMha9WiKdx2Ay nhVZexaLEkNzknX7J2cfesFnvuF4f7s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-230-3ot2Est2PpKtATOqPiP9vg-1; Thu, 10 Sep 2020 15:50:00 -0400 X-MC-Unique: 3ot2Est2PpKtATOqPiP9vg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 936611007B00; Thu, 10 Sep 2020 19:49:59 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C7D619C66; Thu, 10 Sep 2020 19:49:59 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 11/18] chardev: Rename SOCKET_CHARDEV to CHARDEV_SOCKET Date: Thu, 10 Sep 2020 15:48:56 -0400 Message-Id: <20200910194903.4104696-12-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-socket.c | 68 +++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 95e45812d5..fac2b4a821 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -88,7 +88,7 @@ struct SocketChardev { }; typedef struct SocketChardev SocketChardev; -DECLARE_INSTANCE_CHECKER(SocketChardev, SOCKET_CHARDEV, +DECLARE_INSTANCE_CHECKER(SocketChardev, CHARDEV_SOCKET, TYPE_CHARDEV_SOCKET) static gboolean socket_reconnect_timeout(gpointer opaque); @@ -120,7 +120,7 @@ static void tcp_chr_reconn_timer_cancel(SocketChardev *s) static void qemu_chr_socket_restart_timer(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); char *name; assert(s->state == TCP_CHARDEV_STATE_DISCONNECTED); @@ -137,7 +137,7 @@ static void qemu_chr_socket_restart_timer(Chardev *chr) static void check_report_connect_error(Chardev *chr, Error *err) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (!s->connect_err_reported) { error_reportf_err(err, @@ -160,7 +160,7 @@ static void tcp_chr_disconnect_locked(Chardev *chr); /* Called with chr_write_lock held. */ static int tcp_chr_write(Chardev *chr, const uint8_t *buf, int len) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (s->state == TCP_CHARDEV_STATE_CONNECTED) { int ret = io_channel_send_full(s->ioc, buf, len, @@ -195,7 +195,7 @@ static int tcp_chr_write(Chardev *chr, const uint8_t *buf, int len) static int tcp_chr_read_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(opaque); + SocketChardev *s = CHARDEV_SOCKET(opaque); if (s->state != TCP_CHARDEV_STATE_CONNECTED) { return 0; } @@ -276,7 +276,7 @@ static void tcp_chr_process_IAC_bytes(Chardev *chr, static int tcp_get_msgfds(Chardev *chr, int *fds, int num) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); int to_copy = (s->read_msgfds_num < num) ? s->read_msgfds_num : num; @@ -302,7 +302,7 @@ static int tcp_get_msgfds(Chardev *chr, int *fds, int num) static int tcp_set_msgfds(Chardev *chr, int *fds, int num) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); /* clear old pending fd array */ g_free(s->write_msgfds); @@ -327,7 +327,7 @@ static int tcp_set_msgfds(Chardev *chr, int *fds, int num) static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); struct iovec iov = { .iov_base = buf, .iov_len = len }; int ret; size_t i; @@ -384,7 +384,7 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len) static GSource *tcp_chr_add_watch(Chardev *chr, GIOCondition cond) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); return qio_channel_create_watch(s->ioc, cond); } @@ -399,7 +399,7 @@ static void remove_hup_source(SocketChardev *s) static void tcp_chr_free_connection(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); int i; if (s->read_msgfds_num) { @@ -479,7 +479,7 @@ static void update_disconnected_filename(SocketChardev *s) */ static void tcp_chr_disconnect_locked(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); bool emit_close = s->state == TCP_CHARDEV_STATE_CONNECTED; tcp_chr_free_connection(chr); @@ -507,7 +507,7 @@ static void tcp_chr_disconnect(Chardev *chr) static gboolean tcp_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) { Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(opaque); + SocketChardev *s = CHARDEV_SOCKET(opaque); uint8_t buf[CHR_READ_BUF_LEN]; int len, size; @@ -546,7 +546,7 @@ static gboolean tcp_chr_hup(QIOChannel *channel, static int tcp_chr_sync_read(Chardev *chr, const uint8_t *buf, int len) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); int size; if (s->state != TCP_CHARDEV_STATE_CONNECTED) { @@ -627,7 +627,7 @@ static void update_ioc_handlers(SocketChardev *s) static void tcp_chr_connect(void *opaque) { Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(opaque); + SocketChardev *s = CHARDEV_SOCKET(opaque); g_free(chr->filename); chr->filename = qemu_chr_compute_filename(s); @@ -648,7 +648,7 @@ static void tcp_chr_telnet_destroy(SocketChardev *s) static void tcp_chr_update_read_handler(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (s->listener && s->state == TCP_CHARDEV_STATE_DISCONNECTED) { /* @@ -708,7 +708,7 @@ end: static void tcp_chr_telnet_init(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); TCPChardevTelnetInit *init; size_t n = 0; @@ -779,7 +779,7 @@ static void tcp_chr_websock_handshake(QIOTask *task, gpointer user_data) static void tcp_chr_websock_init(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); QIOChannelWebsock *wioc = NULL; gchar *name; @@ -817,7 +817,7 @@ static void tcp_chr_tls_handshake(QIOTask *task, static void tcp_chr_tls_init(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); QIOChannelTLS *tioc; gchar *name; @@ -855,7 +855,7 @@ static void tcp_chr_tls_init(Chardev *chr) static void tcp_chr_set_client_ioc_name(Chardev *chr, QIOChannelSocket *sioc) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); char *name; name = g_strdup_printf("chardev-tcp-%s-%s", s->is_listen ? "server" : "client", @@ -867,7 +867,7 @@ static void tcp_chr_set_client_ioc_name(Chardev *chr, static int tcp_chr_new_client(Chardev *chr, QIOChannelSocket *sioc) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (s->state != TCP_CHARDEV_STATE_CONNECTING) { return -1; @@ -906,7 +906,7 @@ static int tcp_chr_add_client(Chardev *chr, int fd) { int ret; QIOChannelSocket *sioc; - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (s->state != TCP_CHARDEV_STATE_DISCONNECTED) { return -1; @@ -928,7 +928,7 @@ static void tcp_chr_accept(QIONetListener *listener, void *opaque) { Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); tcp_chr_change_state(s, TCP_CHARDEV_STATE_CONNECTING); tcp_chr_set_client_ioc_name(chr, cioc); @@ -938,7 +938,7 @@ static void tcp_chr_accept(QIONetListener *listener, static int tcp_chr_connect_client_sync(Chardev *chr, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); QIOChannelSocket *sioc = qio_channel_socket_new(); tcp_chr_change_state(s, TCP_CHARDEV_STATE_CONNECTING); tcp_chr_set_client_ioc_name(chr, sioc); @@ -955,7 +955,7 @@ static int tcp_chr_connect_client_sync(Chardev *chr, Error **errp) static void tcp_chr_accept_server_sync(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); QIOChannelSocket *sioc; info_report("QEMU waiting for connection on: %s", chr->filename); @@ -969,7 +969,7 @@ static void tcp_chr_accept_server_sync(Chardev *chr) static int tcp_chr_wait_connected(Chardev *chr, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); const char *opts[] = { "telnet", "tn3270", "websock", "tls-creds" }; bool optset[] = { s->is_telnet, s->is_tn3270, s->is_websock, s->tls_creds }; size_t i; @@ -1056,7 +1056,7 @@ static int tcp_chr_wait_connected(Chardev *chr, Error **errp) static void char_socket_finalize(Object *obj) { Chardev *chr = CHARDEV(obj); - SocketChardev *s = SOCKET_CHARDEV(obj); + SocketChardev *s = CHARDEV_SOCKET(obj); tcp_chr_free_connection(chr); tcp_chr_reconn_timer_cancel(s); @@ -1080,7 +1080,7 @@ static void qemu_chr_socket_connected(QIOTask *task, void *opaque) { QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(qio_task_get_source(task)); Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); Error *err = NULL; s->connect_task = NULL; @@ -1114,7 +1114,7 @@ static void tcp_chr_connect_client_task(QIOTask *task, static void tcp_chr_connect_client_async(Chardev *chr) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); QIOChannelSocket *sioc; tcp_chr_change_state(s, TCP_CHARDEV_STATE_CONNECTING); @@ -1143,7 +1143,7 @@ static void tcp_chr_connect_client_async(Chardev *chr) static gboolean socket_reconnect_timeout(gpointer opaque) { Chardev *chr = CHARDEV(opaque); - SocketChardev *s = SOCKET_CHARDEV(opaque); + SocketChardev *s = CHARDEV_SOCKET(opaque); qemu_mutex_lock(&chr->chr_write_lock); g_source_unref(s->reconnect_timer); @@ -1165,7 +1165,7 @@ static int qmp_chardev_open_socket_server(Chardev *chr, bool is_waitconnect, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); char *name; if (is_telnet) { s->do_telnetopt = 1; @@ -1203,7 +1203,7 @@ static int qmp_chardev_open_socket_client(Chardev *chr, int64_t reconnect, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); if (reconnect > 0) { s->reconnect_time = reconnect; @@ -1300,7 +1300,7 @@ static void qmp_chardev_open_socket(Chardev *chr, bool *be_opened, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(chr); + SocketChardev *s = CHARDEV_SOCKET(chr); ChardevSocket *sock = backend->u.socket.data; bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; bool is_listen = sock->has_server ? sock->server : true; @@ -1468,7 +1468,7 @@ static void char_socket_get_addr(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(obj); + SocketChardev *s = CHARDEV_SOCKET(obj); visit_type_SocketAddress(v, name, &s->addr, errp); } @@ -1476,7 +1476,7 @@ char_socket_get_addr(Object *obj, Visitor *v, const char *name, static bool char_socket_get_connected(Object *obj, Error **errp) { - SocketChardev *s = SOCKET_CHARDEV(obj); + SocketChardev *s = CHARDEV_SOCKET(obj); return s->state == TCP_CHARDEV_STATE_CONNECTED; } From patchwork Thu Sep 10 19:48:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273977 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 428B2C433E2 for ; Thu, 10 Sep 2020 19:57:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E23E320882 for ; Thu, 10 Sep 2020 19:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Y206YV4U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E23E320882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGShA-0001zF-1K for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSaE-0005KI-Ul for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:14 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:41545 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSaD-0000eL-1r for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8byXPCH0aJllOHyLbYvO2RbX1+WLveIWvxPuKW8UHrw=; b=Y206YV4UzjeCI9ZSc9C+VwAElsn0O6mIm+zG5lS8ylw7McvcMuo6QN72nqa7tWcjLYdmPB SaBvuQq07Mfh15RxirK+jLpA9bJ3wgYtLmTjtqziMItCMkn0s6kzECdxquFionjdaq7ekw Obf7bdy9r0dLyFuOGD5tzSO77ZT9QrM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-MeJSmG9vOiqNDko3pcpSSA-1; Thu, 10 Sep 2020 15:50:10 -0400 X-MC-Unique: MeJSmG9vOiqNDko3pcpSSA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BDA351074640; Thu, 10 Sep 2020 19:50:09 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F22F7EB74; Thu, 10 Sep 2020 19:50:00 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 12/18] chardev: Rename SPICE_CHARDEV to CHARDEV_SPICE Date: Thu, 10 Sep 2020 15:48:57 -0400 Message-Id: <20200910194903.4104696-13-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- include/chardev/spice.h | 2 +- chardev/spice.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/chardev/spice.h b/include/chardev/spice.h index 99f26aedde..a48146d2c1 100644 --- a/include/chardev/spice.h +++ b/include/chardev/spice.h @@ -21,7 +21,7 @@ typedef struct SpiceChardev SpiceChardev; #define TYPE_CHARDEV_SPICEVMC "chardev-spicevmc" #define TYPE_CHARDEV_SPICEPORT "chardev-spiceport" -DECLARE_INSTANCE_CHECKER(SpiceChardev, SPICE_CHARDEV, +DECLARE_INSTANCE_CHECKER(SpiceChardev, CHARDEV_SPICE, TYPE_CHARDEV_SPICE) void qemu_chr_open_spice_port(Chardev *chr, ChardevBackend *backend, diff --git a/chardev/spice.c b/chardev/spice.c index bf7ea1e294..90a6a55626 100644 --- a/chardev/spice.c +++ b/chardev/spice.c @@ -173,7 +173,7 @@ static GSourceFuncs SpiceCharSourceFuncs = { static GSource *spice_chr_add_watch(Chardev *chr, GIOCondition cond) { - SpiceChardev *scd = SPICE_CHARDEV(chr); + SpiceChardev *scd = CHARDEV_SPICE(chr); SpiceCharSource *src; assert(cond & G_IO_OUT); @@ -187,7 +187,7 @@ static GSource *spice_chr_add_watch(Chardev *chr, GIOCondition cond) static int spice_chr_write(Chardev *chr, const uint8_t *buf, int len) { - SpiceChardev *s = SPICE_CHARDEV(chr); + SpiceChardev *s = CHARDEV_SPICE(chr); int read_bytes; assert(s->datalen == 0); @@ -212,7 +212,7 @@ static int spice_chr_write(Chardev *chr, const uint8_t *buf, int len) static void char_spice_finalize(Object *obj) { - SpiceChardev *s = SPICE_CHARDEV(obj); + SpiceChardev *s = CHARDEV_SPICE(obj); vmc_unregister_interface(s); @@ -224,7 +224,7 @@ static void char_spice_finalize(Object *obj) static void spice_vmc_set_fe_open(struct Chardev *chr, int fe_open) { - SpiceChardev *s = SPICE_CHARDEV(chr); + SpiceChardev *s = CHARDEV_SPICE(chr); if (fe_open) { vmc_register_interface(s); } else { @@ -234,7 +234,7 @@ static void spice_vmc_set_fe_open(struct Chardev *chr, int fe_open) static void spice_port_set_fe_open(struct Chardev *chr, int fe_open) { - SpiceChardev *s = SPICE_CHARDEV(chr); + SpiceChardev *s = CHARDEV_SPICE(chr); if (fe_open) { spice_server_port_event(&s->sin, SPICE_PORT_EVENT_OPENED); @@ -245,14 +245,14 @@ static void spice_port_set_fe_open(struct Chardev *chr, int fe_open) static void spice_chr_accept_input(struct Chardev *chr) { - SpiceChardev *s = SPICE_CHARDEV(chr); + SpiceChardev *s = CHARDEV_SPICE(chr); spice_server_char_device_wakeup(&s->sin); } static void chr_open(Chardev *chr, const char *subtype) { - SpiceChardev *s = SPICE_CHARDEV(chr); + SpiceChardev *s = CHARDEV_SPICE(chr); s->active = false; s->sin.subtype = g_strdup(subtype); @@ -313,7 +313,7 @@ void qemu_chr_open_spice_port(Chardev *chr, chr_open(chr, "port"); *be_opened = false; - s = SPICE_CHARDEV(chr); + s = CHARDEV_SPICE(chr); s->sin.portname = g_strdup(name); if (using_spice) { From patchwork Thu Sep 10 19:48:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5F1AC43461 for ; Thu, 10 Sep 2020 19:57:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5358A20882 for ; Thu, 10 Sep 2020 19:57:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VbTTQ1qs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5358A20882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGShB-00021f-Dm for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:57:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSaO-0005i4-C8 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:24 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:25941 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSaM-0000gH-Gs for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MBePDSqlzrFu1qhFH8aoag5gwWmA0I2Kou1cY6jLU20=; b=VbTTQ1qs2QhS5/Uw/7X8akuy0JLWxZPFLs+QaWgQoltIKna4MUjjiDuA7a1rneZim36RKn Gbfc/51cyd5ECyKB1Vp15dd6n1JpDzHcbc4UpndAMmz8gkiT1mokx9wMtFPapCUqaHHzwT Csn52LGq6HyR0Ywjb9wojZsTgDkAi3c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-533-NZ1IhehyNnC559VotfLpEQ-1; Thu, 10 Sep 2020 15:50:18 -0400 X-MC-Unique: NZ1IhehyNnC559VotfLpEQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 093B08015A8; Thu, 10 Sep 2020 19:50:17 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDE9110013D7; Thu, 10 Sep 2020 19:50:10 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 13/18] chardev: Rename TESTDEV_CHARDEV to CHARDEV_TESTDEV Date: Thu, 10 Sep 2020 15:48:58 -0400 Message-Id: <20200910194903.4104696-14-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=207.211.31.81; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/testdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/testdev.c b/chardev/testdev.c index a92caca3c3..307e6bd09c 100644 --- a/chardev/testdev.c +++ b/chardev/testdev.c @@ -40,7 +40,7 @@ struct TestdevChardev { typedef struct TestdevChardev TestdevChardev; #define TYPE_CHARDEV_TESTDEV "chardev-testdev" -DECLARE_INSTANCE_CHECKER(TestdevChardev, TESTDEV_CHARDEV, +DECLARE_INSTANCE_CHECKER(TestdevChardev, CHARDEV_TESTDEV, TYPE_CHARDEV_TESTDEV) /* Try to interpret a whole incoming packet */ @@ -87,7 +87,7 @@ static int testdev_eat_packet(TestdevChardev *testdev) /* The other end is writing some data. Store it and try to interpret */ static int testdev_chr_write(Chardev *chr, const uint8_t *buf, int len) { - TestdevChardev *testdev = TESTDEV_CHARDEV(chr); + TestdevChardev *testdev = CHARDEV_TESTDEV(chr); int tocopy, eaten, orig_len = len; while (len) { From patchwork Thu Sep 10 19:48:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C39C4C433E2 for ; Thu, 10 Sep 2020 19:54:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D9CE208E4 for ; Thu, 10 Sep 2020 19:54:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hcbrNUzP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D9CE208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSe2-0004Mn-Ef for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSaU-0005vz-Gj for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:30 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28250 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSaS-0000jK-Jd for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767427; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yEfAtE+0wDZ7+bvuWCzZ1RN/j1HSUrKTvd6UcuRBbJk=; b=hcbrNUzPou6/z95i08gJleMLg8a7ptbWdl3PguuEsxS7I40rXSFTNJVjoApp8qMAwLpA47 b5scP4oggtdjdrY8EJmYJZAfuDtCtKGviTW80QGXSJRZvhuAE+wnpO3KBF1xs0wuh05EzH nRW89nk966YhOAWDeo1mlSpMiv9HTFc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-82-z4YkpfkTNnSLyKb5Wp0LLg-1; Thu, 10 Sep 2020 15:50:26 -0400 X-MC-Unique: z4YkpfkTNnSLyKb5Wp0LLg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81E1F801AF2; Thu, 10 Sep 2020 19:50:24 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 44C9675125; Thu, 10 Sep 2020 19:50:18 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 14/18] chardev: Rename UDP_CHARDEV to CHARDEV_UDP Date: Thu, 10 Sep 2020 15:48:59 -0400 Message-Id: <20200910194903.4104696-15-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-udp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chardev/char-udp.c b/chardev/char-udp.c index 16b5dbce58..9fa5b19a22 100644 --- a/chardev/char-udp.c +++ b/chardev/char-udp.c @@ -45,13 +45,13 @@ struct UdpChardev { }; typedef struct UdpChardev UdpChardev; -DECLARE_INSTANCE_CHECKER(UdpChardev, UDP_CHARDEV, +DECLARE_INSTANCE_CHECKER(UdpChardev, CHARDEV_UDP, TYPE_CHARDEV_UDP) /* Called with chr_write_lock held. */ static int udp_chr_write(Chardev *chr, const uint8_t *buf, int len) { - UdpChardev *s = UDP_CHARDEV(chr); + UdpChardev *s = CHARDEV_UDP(chr); return qio_channel_write( s->ioc, (const char *)buf, len, NULL); @@ -72,7 +72,7 @@ static void udp_chr_flush_buffer(UdpChardev *s) static int udp_chr_read_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - UdpChardev *s = UDP_CHARDEV(opaque); + UdpChardev *s = CHARDEV_UDP(opaque); s->max_size = qemu_chr_be_can_write(chr); @@ -87,7 +87,7 @@ static int udp_chr_read_poll(void *opaque) static gboolean udp_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) { Chardev *chr = CHARDEV(opaque); - UdpChardev *s = UDP_CHARDEV(opaque); + UdpChardev *s = CHARDEV_UDP(opaque); ssize_t ret; if (s->max_size == 0) { @@ -108,7 +108,7 @@ static gboolean udp_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque) static void udp_chr_update_read_handler(Chardev *chr) { - UdpChardev *s = UDP_CHARDEV(chr); + UdpChardev *s = CHARDEV_UDP(chr); remove_fd_in_watch(chr); if (s->ioc) { @@ -122,7 +122,7 @@ static void udp_chr_update_read_handler(Chardev *chr) static void char_udp_finalize(Object *obj) { Chardev *chr = CHARDEV(obj); - UdpChardev *s = UDP_CHARDEV(obj); + UdpChardev *s = CHARDEV_UDP(obj); remove_fd_in_watch(chr); if (s->ioc) { @@ -200,7 +200,7 @@ static void qmp_chardev_open_udp(Chardev *chr, SocketAddress *remote_addr = socket_address_flatten(udp->remote); QIOChannelSocket *sioc = qio_channel_socket_new(); char *name; - UdpChardev *s = UDP_CHARDEV(chr); + UdpChardev *s = CHARDEV_UDP(chr); int ret; ret = qio_channel_socket_dgram_sync(sioc, local_addr, remote_addr, errp); From patchwork Thu Sep 10 19:49:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305650 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE1BDC433E2 for ; Thu, 10 Sep 2020 19:56:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A23B20882 for ; Thu, 10 Sep 2020 19:56:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I07P92NJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A23B20882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSfu-0007oJ-FT for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:56:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSaa-0006CV-QY for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:36 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:55839 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSaY-0000l9-Sk for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c2fYi56w25yKX3HrO4TcH8qU2ViT59jrGukaF3OOs3o=; b=I07P92NJuECMZv3tuPlVOXR+PIDofFj1mgW+RDCQR2wtvUFqOA+pDowQwqcvcPrU4lm2Cc c1hOGLdQU41ungAi02pj+aQZj+qNILJP+ueFJdprt74Lw0JvqYuhRzhtOOoQWjEotIke0F 1zuaLvrnonzj0B44Sch1PKr4e6jh9Nc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-396-e7dMc9PcPuu8fwxKoiCH8A-1; Thu, 10 Sep 2020 15:50:32 -0400 X-MC-Unique: e7dMc9PcPuu8fwxKoiCH8A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44403800683; Thu, 10 Sep 2020 19:50:31 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95D7319C4F; Thu, 10 Sep 2020 19:50:25 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 15/18] chardev: Rename VC_CHARDEV to CHARDEV_VC Date: Thu, 10 Sep 2020 15:49:00 -0400 Message-Id: <20200910194903.4104696-16-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- ui/console.c | 10 +++++----- ui/gtk.c | 8 ++++---- ui/spice-app.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/console.c b/ui/console.c index f8d7643fe4..37a7c4a713 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1090,12 +1090,12 @@ struct VCChardev { typedef struct VCChardev VCChardev; #define TYPE_CHARDEV_VC "chardev-vc" -DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV, +DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC, TYPE_CHARDEV_VC) static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) { - VCChardev *drv = VC_CHARDEV(chr); + VCChardev *drv = CHARDEV_VC(chr); QemuConsole *s = drv->console; int i; @@ -2108,7 +2108,7 @@ int qemu_console_get_height(QemuConsole *con, int fallback) static void vc_chr_set_echo(Chardev *chr, bool echo) { - VCChardev *drv = VC_CHARDEV(chr); + VCChardev *drv = CHARDEV_VC(chr); QemuConsole *s = drv->console; s->echo = echo; @@ -2148,7 +2148,7 @@ static const GraphicHwOps text_console_ops = { static void text_console_do_init(Chardev *chr, DisplayState *ds) { - VCChardev *drv = VC_CHARDEV(chr); + VCChardev *drv = CHARDEV_VC(chr); QemuConsole *s = drv->console; int g_width = 80 * FONT_WIDTH; int g_height = 24 * FONT_HEIGHT; @@ -2205,7 +2205,7 @@ static void vc_chr_open(Chardev *chr, Error **errp) { ChardevVC *vc = backend->u.vc.data; - VCChardev *drv = VC_CHARDEV(chr); + VCChardev *drv = CHARDEV_VC(chr); QemuConsole *s; unsigned width = 0; unsigned height = 0; diff --git a/ui/gtk.c b/ui/gtk.c index 1c59de2af4..30c607a412 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -179,7 +179,7 @@ struct VCChardev { typedef struct VCChardev VCChardev; #define TYPE_CHARDEV_VC "chardev-vc" -DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV, +DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC, TYPE_CHARDEV_VC) bool gtk_use_gl_area; @@ -1693,7 +1693,7 @@ static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque) static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len) { - VCChardev *vcd = VC_CHARDEV(chr); + VCChardev *vcd = CHARDEV_VC(chr); VirtualConsole *vc = vcd->console; vte_terminal_feed(VTE_TERMINAL(vc->vte.terminal), (const char *)buf, len); @@ -1702,7 +1702,7 @@ static int gd_vc_chr_write(Chardev *chr, const uint8_t *buf, int len) static void gd_vc_chr_set_echo(Chardev *chr, bool echo) { - VCChardev *vcd = VC_CHARDEV(chr); + VCChardev *vcd = CHARDEV_VC(chr); VirtualConsole *vc = vcd->console; if (vc) { @@ -1784,7 +1784,7 @@ static GSList *gd_vc_vte_init(GtkDisplayState *s, VirtualConsole *vc, GtkWidget *box; GtkWidget *scrollbar; GtkAdjustment *vadjustment; - VCChardev *vcd = VC_CHARDEV(chr); + VCChardev *vcd = CHARDEV_VC(chr); vc->s = s; vc->vte.echo = vcd->echo; diff --git a/ui/spice-app.c b/ui/spice-app.c index 93e105c6ee..e66c422e02 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -47,7 +47,7 @@ struct VCChardev { typedef struct VCChardev VCChardev; #define TYPE_CHARDEV_VC "chardev-vc" -DECLARE_INSTANCE_CHECKER(VCChardev, VC_CHARDEV, +DECLARE_INSTANCE_CHECKER(VCChardev, CHARDEV_VC, TYPE_CHARDEV_VC) static ChardevBackend * From patchwork Thu Sep 10 19:49:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 305648 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B55FC2D0A7 for ; Thu, 10 Sep 2020 19:57:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1870F208E4 for ; Thu, 10 Sep 2020 19:57:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DpOy/iCI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1870F208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGShS-0002lm-45 for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:57:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSai-0006ZY-05 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:44 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40318 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSaf-0000lT-LU for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nlA62odmh2HZphdCDpVBp6BSdOLXWunBO2fvyN59ZUk=; b=DpOy/iCI9w+y6/i1fgWbgmSgLoYXkhRrHaOKwQ98gSyjbbEg7jfl//YLfaCnVw5lpwslhT fNbz+dm4zOQrRqiFrRXziCbkvNVCD9JWUZWRPtdKTYp3+I6qYS6Lq+wLh5aTgzdD/GW1jF haufTUopy8GZy64iDPTbZvAKwW9Jv1k= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-OSLEgkZ3P3OoN4F4IxhaUA-1; Thu, 10 Sep 2020 15:50:39 -0400 X-MC-Unique: OSLEgkZ3P3OoN4F4IxhaUA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2AA0E1074640; Thu, 10 Sep 2020 19:50:38 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64BD55C1BD; Thu, 10 Sep 2020 19:50:32 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 16/18] chardev: Rename WCTABLET_CHARDEV to CHARDEV_WCTABLET Date: Thu, 10 Sep 2020 15:49:01 -0400 Message-Id: <20200910194903.4104696-17-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.120; envelope-from=ehabkost@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/wctablet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chardev/wctablet.c b/chardev/wctablet.c index 95e005f5a5..c5b0be0451 100644 --- a/chardev/wctablet.c +++ b/chardev/wctablet.c @@ -86,7 +86,7 @@ struct TabletChardev { typedef struct TabletChardev TabletChardev; #define TYPE_CHARDEV_WCTABLET "chardev-wctablet" -DECLARE_INSTANCE_CHECKER(TabletChardev, WCTABLET_CHARDEV, +DECLARE_INSTANCE_CHECKER(TabletChardev, CHARDEV_WCTABLET, TYPE_CHARDEV_WCTABLET) @@ -187,7 +187,7 @@ static QemuInputHandler wctablet_handler = { static void wctablet_chr_accept_input(Chardev *chr) { - TabletChardev *tablet = WCTABLET_CHARDEV(chr); + TabletChardev *tablet = CHARDEV_WCTABLET(chr); int len, canWrite; canWrite = qemu_chr_be_can_write(chr); @@ -208,7 +208,7 @@ static void wctablet_chr_accept_input(Chardev *chr) static int wctablet_chr_write(struct Chardev *chr, const uint8_t *buf, int len) { - TabletChardev *tablet = WCTABLET_CHARDEV(chr); + TabletChardev *tablet = CHARDEV_WCTABLET(chr); unsigned int i, clen; char *pos; @@ -297,7 +297,7 @@ static int wctablet_chr_write(struct Chardev *chr, static int wctablet_chr_ioctl(Chardev *chr, int cmd, void *arg) { - TabletChardev *tablet = WCTABLET_CHARDEV(chr); + TabletChardev *tablet = CHARDEV_WCTABLET(chr); QEMUSerialSetParams *ssp; switch (cmd) { @@ -317,7 +317,7 @@ static int wctablet_chr_ioctl(Chardev *chr, int cmd, void *arg) static void wctablet_chr_finalize(Object *obj) { - TabletChardev *tablet = WCTABLET_CHARDEV(obj); + TabletChardev *tablet = CHARDEV_WCTABLET(obj); qemu_input_handler_unregister(tablet->hs); g_free(tablet); @@ -328,7 +328,7 @@ static void wctablet_chr_open(Chardev *chr, bool *be_opened, Error **errp) { - TabletChardev *tablet = WCTABLET_CHARDEV(chr); + TabletChardev *tablet = CHARDEV_WCTABLET(chr); *be_opened = true; From patchwork Thu Sep 10 19:49:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0673C43461 for ; Thu, 10 Sep 2020 19:57:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5CB6720882 for ; Thu, 10 Sep 2020 19:57:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NDwtBBrH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CB6720882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGShR-0002md-8q for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:57:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSai-0006cE-Ov for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSag-0000lj-P2 for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H9vNKAG8qHMhl5vDePVh8sY3FceBRYSzy2AKH9J7ecE=; b=NDwtBBrHJtLT6HBigEAH+8MSHeH2GNlZqvpgRH2muoTn98hqpIcB3ChGOS3mCm3xkEOlPZ 16iieloiTU3Zg938zx6ZMjnhF7jxGSExPhatu89WfptO35aeI89l+C7rMAqJqCsJ/gA4// rLOrYaexiuRNCfenPOFesFha0nVQ7MI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-YZcJghuJOX2brIf5dhqGbQ-1; Thu, 10 Sep 2020 15:50:40 -0400 X-MC-Unique: YZcJghuJOX2brIf5dhqGbQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F3C010082E6; Thu, 10 Sep 2020 19:50:39 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id E95315C1BD; Thu, 10 Sep 2020 19:50:38 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 17/18] chardev: Rename WIN_CHARDEV to CHARDEV_WIN Date: Thu, 10 Sep 2020 15:49:02 -0400 Message-Id: <20200910194903.4104696-18-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 08:38:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- include/chardev/char-win.h | 2 +- chardev/char-pipe.c | 2 +- chardev/char-win.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/chardev/char-win.h b/include/chardev/char-win.h index 485521469c..0e718d60c4 100644 --- a/include/chardev/char-win.h +++ b/include/chardev/char-win.h @@ -44,7 +44,7 @@ typedef struct WinChardev WinChardev; #define NRECVBUF 2048 #define TYPE_CHARDEV_WIN "chardev-win" -DECLARE_INSTANCE_CHECKER(WinChardev, WIN_CHARDEV, +DECLARE_INSTANCE_CHECKER(WinChardev, CHARDEV_WIN, TYPE_CHARDEV_WIN) void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open); diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index fd12c9e63b..96854cfe99 100644 --- a/chardev/char-pipe.c +++ b/chardev/char-pipe.c @@ -43,7 +43,7 @@ static int win_chr_pipe_init(Chardev *chr, const char *filename, Error **errp) { - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); OVERLAPPED ov; int ret; DWORD size; diff --git a/chardev/char-win.c b/chardev/char-win.c index d4fb44c4dc..39cfd12177 100644 --- a/chardev/char-win.c +++ b/chardev/char-win.c @@ -30,7 +30,7 @@ static void win_chr_read(Chardev *chr, DWORD len) { - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); int max_size = qemu_chr_be_can_write(chr); int ret, err; uint8_t buf[CHR_READ_BUF_LEN]; @@ -61,7 +61,7 @@ static void win_chr_read(Chardev *chr, DWORD len) static int win_chr_serial_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - WinChardev *s = WIN_CHARDEV(opaque); + WinChardev *s = CHARDEV_WIN(opaque); COMSTAT status; DWORD comerr; @@ -75,7 +75,7 @@ static int win_chr_serial_poll(void *opaque) int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp) { - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); COMMCONFIG comcfg; COMMTIMEOUTS cto = { 0, 0, 0, 0, 0}; COMSTAT comstat; @@ -142,7 +142,7 @@ int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp) int win_chr_pipe_poll(void *opaque) { Chardev *chr = CHARDEV(opaque); - WinChardev *s = WIN_CHARDEV(opaque); + WinChardev *s = CHARDEV_WIN(opaque); DWORD size; PeekNamedPipe(s->file, NULL, 0, NULL, &size, NULL); @@ -156,7 +156,7 @@ int win_chr_pipe_poll(void *opaque) /* Called with chr_write_lock held. */ static int win_chr_write(Chardev *chr, const uint8_t *buf, int len1) { - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); DWORD len, ret, size, err; len = len1; @@ -192,7 +192,7 @@ static int win_chr_write(Chardev *chr, const uint8_t *buf, int len1) static void char_win_finalize(Object *obj) { Chardev *chr = CHARDEV(obj); - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); if (s->hsend) { CloseHandle(s->hsend); @@ -214,7 +214,7 @@ static void char_win_finalize(Object *obj) void win_chr_set_file(Chardev *chr, HANDLE file, bool keep_open) { - WinChardev *s = WIN_CHARDEV(chr); + WinChardev *s = CHARDEV_WIN(chr); s->keep_open = keep_open; s->file = file; From patchwork Thu Sep 10 19:49:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 273975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 952ADC2D0A7 for ; Thu, 10 Sep 2020 19:58:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1386620882 for ; Thu, 10 Sep 2020 19:58:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DMkhvXWW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1386620882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGSiY-0005a2-4S for qemu-devel@archiver.kernel.org; Thu, 10 Sep 2020 15:58:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGSaq-0006rY-Mv for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:52 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:37793 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kGSan-0000nx-DX for qemu-devel@nongnu.org; Thu, 10 Sep 2020 15:50:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599767448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=meSyVk5F9C2UK8oJsE6YKKdolkeEEIbEB3IIlhaqprI=; b=DMkhvXWWVNiTc6k+Bc7+JQZ0wRtH0j1+QanoSjYvAW3c3dgvabr3SmJ7aXLHRJ/hyCyK6/ 2EOD8uH951Sd2ImqCKq8FpGgI3nIGOgk+g1j+cgKArifm0+dKZXiTp99+GbGSxsoKRCo5Y Rt/hOyGSB8s8EDB+bQZJoHoJK7ApCfU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-mWlgypEPOqC7YQji-mn0Ww-1; Thu, 10 Sep 2020 15:50:46 -0400 X-MC-Unique: mWlgypEPOqC7YQji-mn0Ww-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04191425D1; Thu, 10 Sep 2020 19:50:46 +0000 (UTC) Received: from localhost (ovpn-66-226.rdu2.redhat.com [10.10.66.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBB2B7E8F9; Thu, 10 Sep 2020 19:50:39 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Subject: [PATCH 18/18] chardev: Rename WIN_STDIO_CHARDEV to CHARDEV_WIN_STDIO Date: Thu, 10 Sep 2020 15:49:03 -0400 Message-Id: <20200910194903.4104696-19-ehabkost@redhat.com> In-Reply-To: <20200910194903.4104696-1-ehabkost@redhat.com> References: <20200910194903.4104696-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=ehabkost@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/10 09:07:44 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Daniel P. Berrange" , Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , =?utf-8?q?Marc-Andr=C3=A9_Lu?= =?utf-8?q?reau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Rename instance and class type checkers to match the TYPE_CHARDEV_* constant names and the QOM type name strings ("chardev-*"). Signed-off-by: Eduardo Habkost --- chardev/char-win-stdio.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.c index a4771ab82e..46f715afb1 100644 --- a/chardev/char-win-stdio.c +++ b/chardev/char-win-stdio.c @@ -40,13 +40,13 @@ struct WinStdioChardev { }; typedef struct WinStdioChardev WinStdioChardev; -DECLARE_INSTANCE_CHECKER(WinStdioChardev, WIN_STDIO_CHARDEV, +DECLARE_INSTANCE_CHECKER(WinStdioChardev, CHARDEV_WIN_STDIO, TYPE_CHARDEV_WIN_STDIO) static void win_stdio_wait_func(void *opaque) { Chardev *chr = CHARDEV(opaque); - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(opaque); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(opaque); INPUT_RECORD buf[4]; int ret; DWORD dwSize; @@ -79,7 +79,7 @@ static void win_stdio_wait_func(void *opaque) static DWORD WINAPI win_stdio_thread(LPVOID param) { - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(param); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(param); int ret; DWORD dwSize; @@ -118,7 +118,7 @@ static DWORD WINAPI win_stdio_thread(LPVOID param) static void win_stdio_thread_wait_func(void *opaque) { Chardev *chr = CHARDEV(opaque); - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(opaque); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(opaque); if (qemu_chr_be_can_write(chr)) { qemu_chr_be_write(chr, &stdio->win_stdio_buf, 1); @@ -129,7 +129,7 @@ static void win_stdio_thread_wait_func(void *opaque) static void qemu_chr_set_echo_win_stdio(Chardev *chr, bool echo) { - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(chr); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(chr); DWORD dwMode = 0; GetConsoleMode(stdio->hStdIn, &dwMode); @@ -146,7 +146,7 @@ static void qemu_chr_open_stdio(Chardev *chr, bool *be_opened, Error **errp) { - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(chr); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(chr); DWORD dwMode; int is_console = 0; @@ -213,7 +213,7 @@ err1: static void char_win_stdio_finalize(Object *obj) { - WinStdioChardev *stdio = WIN_STDIO_CHARDEV(obj); + WinStdioChardev *stdio = CHARDEV_WIN_STDIO(obj); if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) { CloseHandle(stdio->hInputReadyEvent);