From patchwork Tue Dec 17 16:37:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298227 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DDEC139A for ; Tue, 17 Dec 2019 16:43:38 +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 6453821D7D for ; Tue, 17 Dec 2019 16:43:38 +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="ZMSFuT6r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6453821D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFwf-0003mV-0c for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:43:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51350) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFsY-0005va-UU for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFsW-0000bW-A3 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:22 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:30748 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFsW-0000ax-6d for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600759; 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=kbJd97UPYoKV5uP5HIXzv9iTL8Rz6OLSDFPr7bKkBZU=; b=ZMSFuT6raREBnK6aflTAdsyGLUofp+a6oLDGkblIsQN7ru9s3lAVM3kbxirs6dKBqF7Dme DXjOTFGTVPi+jKYTkf2GHUGR9c8Zg/JOzwguULKIzTqbRIdgedDE5MVGj8hSxuurW8Gdks FKSN/WgBbMt6HP1K/vmw9fcYg3P8BLo= 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-246-JyYpJwhBNOmUrZpBXPsPvA-1; Tue, 17 Dec 2019 11:39:17 -0500 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 67CE810054E3; Tue, 17 Dec 2019 16:39:12 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8131468877; Tue, 17 Dec 2019 16:38:40 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [PATCH 01/14] hw/ipmi: Remove unnecessary declarations Date: Tue, 17 Dec 2019 17:37:55 +0100 Message-Id: <20191217163808.20068-2-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: JyYpJwhBNOmUrZpBXPsPvA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, qemu-trivial@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , Corey Minyard , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Since we don't use these methods before defining them, no need to forward-declare them. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Corey Minyard --- Cc: Corey Minyard In case the other patches are rejected: Cc: qemu-trivial@nongnu.org --- hw/ipmi/ipmi_bmc_extern.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 87da9ff99c..450926e5fb 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -87,10 +87,6 @@ typedef struct IPMIBmcExtern { bool send_reset; } IPMIBmcExtern; -static int can_receive(void *opaque); -static void receive(void *opaque, const uint8_t *buf, int size); -static void chr_event(void *opaque, int event); - static unsigned char ipmb_checksum(const unsigned char *data, int size, unsigned char start) { From patchwork Tue Dec 17 16:37:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298221 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B6C4138C for ; Tue, 17 Dec 2019 16:41:05 +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 00ABC21D7D for ; Tue, 17 Dec 2019 16:41:05 +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="cVEOSojg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00ABC21D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFuB-00088X-N2 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:41:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51507) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFsz-0006bO-0H for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFsx-0001N9-Vm for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:48 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:29657 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFsx-0001MP-SA for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:39:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600787; 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=M5eisbppqcSSLnhV695pR3rX79aTKoSsMq1feLLMG84=; b=cVEOSojg6DdTohvNT/8RGjoUaYXPZ1ZIYKnBngroWxImaUiMg0QJAnQkOVaOUUCH1gyEQO lcJ5Fta55Xg4aacIUy9BEAuOZeBoGDQEi7AQfCMqfgThxKQhZXLEFtxNXj847kPArlsYu5 OMkb4Lc3yutCY87I7gY3BMM0DyAUlk4= 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-96-DAQQ_TLkMuupDsbn6svgGg-1; Tue, 17 Dec 2019 11:39:45 -0500 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 70B7F800053; Tue, 17 Dec 2019 16:39:41 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63EB5675BF; Tue, 17 Dec 2019 16:39:12 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 02/14] chardev/char: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:37:56 +0100 Message-Id: <20191217163808.20068-3-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: DAQQ_TLkMuupDsbn6svgGg-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: chardev/char.c: In function ‘qemu_chr_be_event’: chardev/char.c:65:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 65 | switch (event) { | ^~~~~~ chardev/char.c:65:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] chardev/char.c:65:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Marc-André Lureau" Cc: Paolo Bonzini --- chardev/char.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chardev/char.c b/chardev/char.c index 7b6b2cb123..c4b6bbc55a 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -69,6 +69,9 @@ void qemu_chr_be_event(Chardev *s, int event) case CHR_EVENT_CLOSED: s->be_open = 0; break; + default: + /* Ignore */ + break; } CHARDEV_GET_CLASS(s)->chr_be_event(s, event); From patchwork Tue Dec 17 16:37:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298225 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B014C138C for ; Tue, 17 Dec 2019 16:43:16 +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 8614F24655 for ; Tue, 17 Dec 2019 16:43:16 +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="FvSrI5jN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8614F24655 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFwJ-0003Bo-8v for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:43:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51752) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFtU-00079d-2s for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFtS-00023J-Pc for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:20 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54078 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFtS-0001zs-LQ for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600815; 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=UyNiSII4bECQvnQNLsrJWX7wCLrL6i3l3plxAAkIibg=; b=FvSrI5jNcjscxO87wz5nSL9+5BF+au2w3g7N+VM9pleU5g0say2m65rOv3ODiOyCPH5/mC cVbkJgRvJXJzlqx1EerMd3oXyQVzXjfh8Fodi8jkZqz8b/D1u5SqpSA1koMpA1dtqslWNB zIyFj6ZCcTBPKxiOzB1oJnBqgcWcVsg= 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-339-XjCk825XO-Sq4YcNnMKgDA-1; Tue, 17 Dec 2019 11:40:13 -0500 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 AA5E8800EBF; Tue, 17 Dec 2019 16:40:08 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 22850675B0; Tue, 17 Dec 2019 16:39:41 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 03/14] vhost-user: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:37:57 +0100 Message-Id: <20191217163808.20068-4-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: XjCk825XO-Sq4YcNnMKgDA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC backends/cryptodev-vhost-user.o backends/cryptodev-vhost-user.c: In function ‘cryptodev_vhost_user_event’: backends/cryptodev-vhost-user.c:163:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 163 | switch (event) { | ^~~~~~ backends/cryptodev-vhost-user.c:163:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] backends/cryptodev-vhost-user.c:163:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Gonglei (Arei)" --- backends/cryptodev-vhost-user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c index b344283940..d700934a0e 100644 --- a/backends/cryptodev-vhost-user.c +++ b/backends/cryptodev-vhost-user.c @@ -171,6 +171,9 @@ static void cryptodev_vhost_user_event(void *opaque, int event) b->ready = false; cryptodev_vhost_user_stop(queues, s); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:37:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298223 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05D55139A for ; Tue, 17 Dec 2019 16:41:52 +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 CF25324655 for ; Tue, 17 Dec 2019 16:41: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="FHhJGVVe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF25324655 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFuw-0000yE-NH for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:41:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51907) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFtr-0007d3-CZ for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFtq-0002MH-6g for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:43 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53391 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFtq-0002Ko-2k for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:40:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600840; 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=7hfjipPNHS05FZX4gKyoZHOjOIm+A4c3HTMdvd0V9Mc=; b=FHhJGVVeUzXjRcj/gkDlmOiXr911ot3L89fsjHtBw2Kh2LTS39Er8VhXUcgM12Kuh10Q4K mfpjCjtuF6Ty51YaLCKy/i7RHtZVNpyNsaFMs2L72np4HhRApC0421P7uLYbsHSO6TKzMW 65vziEPU13/X1Zz1Za86/j9mQpWDvP4= 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-397-FouF0qVGOieVWA7x8cLNmA-1; Tue, 17 Dec 2019 11:40:38 -0500 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 19AAC800D55; Tue, 17 Dec 2019 16:40:34 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76D8F68865; Tue, 17 Dec 2019 16:40:09 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 04/14] virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:37:58 +0100 Message-Id: <20191217163808.20068-5-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: FouF0qVGOieVWA7x8cLNmA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC hw/char/virtio-console.o hw/char/virtio-console.c: In function ‘chr_event’: hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 154 | switch (event) { | ^~~~~~ hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Michael S. Tsirkin" Cc: Laurent Vivier Cc: Amit Shah Cc: "Marc-André Lureau" Cc: Paolo Bonzini --- hw/char/virtio-console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index c13649f1ef..d3f7ba36fe 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -162,6 +162,9 @@ static void chr_event(void *opaque, int event) } virtio_serial_close(port); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:37:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298239 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8815E138C for ; Tue, 17 Dec 2019 16:47: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 5DC2221D7D for ; Tue, 17 Dec 2019 16:47: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="FdwzHp/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DC2221D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG05-0007ff-OJ for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:47:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52166) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFuZ-0000Kv-20 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFuX-0003D2-RH for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:26 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28232 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFuX-0003Cd-Ny for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600885; 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=evC+sSxtNpMvTh5wC5Sh3YUUefjPdijlTohqC3qDS2A=; b=FdwzHp/lP5sHuZ7ttGBe8+Bp64eZdSnCvUaVkaZe2KNKOzeKiA0xtjpJNdRZ/yD1aXTfCb RkaV4OJSHt2sxyWUjvl0HeWye7s/QlESSHxJpH36b2L12k4x2IS9em56hbHuJaabTNUTr8 S7EejjDt8FKXJ4M27IoYq2HLnQ8HfRQ= 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-322-VG_OKgThMUSaVLGhASXBGA-1; Tue, 17 Dec 2019 11:41:21 -0500 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 214938E3E0C; Tue, 17 Dec 2019 16:41:17 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A85586888E; Tue, 17 Dec 2019 16:40:34 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 05/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:37:59 +0100 Message-Id: <20191217163808.20068-6-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: VG_OKgThMUSaVLGhASXBGA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: hw/ipmi/ipmi_bmc_extern.c: In function ‘chr_event’: hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 389 | switch (event) { | ^~~~~~ hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 450926e5fb..9d67e6a4a5 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -435,6 +435,10 @@ static void chr_event(void *opaque, int event) k->handle_rsp(s, ibe->outbuf[0], ibe->inbuf + 1, 3); } break; + + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E76091580 for ; Tue, 17 Dec 2019 16:47: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 774BB21D7D for ; Tue, 17 Dec 2019 16:47: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="EvzdZtdm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 774BB21D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG0j-0000Jh-E2 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:47:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52351) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFv2-0001Bg-3I for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFv0-0003bR-Us for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:55 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55887 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFv0-0003Zz-RT for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:41:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600914; 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=aNeyU7/Lv4XpR7KzxXHIM4Nb2F8VTLxcvwFNAQff+7M=; b=EvzdZtdmAApTryXwtAOo7yMv+yhLqtNCUWabet+VDmINXW7Ipfpo5BbC51pOMnflKBa734 iXZ6koR/nRlJbDxO/r3fCOnX24wsHgapjrT27j4AnHRCaVV28JP4of3I5Cd6GDb8dU9zOD 99DL4oQ5CAeao04wl361IB/VcM//BaM= 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-155-0NjUTsbmNF-QwDxiAk6QrA-1; Tue, 17 Dec 2019 11:41:49 -0500 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 B5BBF1034B23; Tue, 17 Dec 2019 16:41:43 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9588C77C80; Tue, 17 Dec 2019 16:41:17 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 06/14] hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:00 +0100 Message-Id: <20191217163808.20068-7-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 0NjUTsbmNF-QwDxiAk6QrA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: hw/usb/dev-serial.c: In function ‘usb_serial_event’: hw/usb/dev-serial.c:468:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] 468 | switch (event) { | ^~~~~~ hw/usb/dev-serial.c:468:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Gerd Hoffmann Cc: Samuel Thibault --- hw/usb/dev-serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 45cc74128a..497f932a5a 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -479,6 +479,9 @@ static void usb_serial_event(void *opaque, int event) usb_device_detach(&s->dev); } break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298259 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68535138C for ; Tue, 17 Dec 2019 16:51:44 +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 3E75D21835 for ; Tue, 17 Dec 2019 16:51:44 +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="Q2Mgumvd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E75D21835 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG4V-0005D9-2S for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:51:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52557) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFvN-0001mz-2y for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFvM-00045W-0D for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:16 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:36222 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFvL-00042v-Rs for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600935; 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=ZWk3zkMpgfU3ZN3J4EBBgjkfYGLkbV6WwKoyJTF7Ddg=; b=Q2MgumvdGvUajQdfGBqiQYwIMW9Qic7W5nkAzNlx1wgpI1UmMjlgTKLvdfGUWSIe4A6aNQ OAM8EFB++J8vl8pWjSaXFxynHNplww8c19ywjTaqhPZEzEZtdpF8k9FFN1GxqBWdBdnCOj DsmSG7plpGce4+fkFbbce+smJLFojyw= 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-258-tPNfmaoHPaSfPXAbkkq9zQ-1; Tue, 17 Dec 2019 11:42:11 -0500 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 77E7080256C; Tue, 17 Dec 2019 16:42:07 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CA6C675B0; Tue, 17 Dec 2019 16:41:44 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 07/14] ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:01 +0100 Message-Id: <20191217163808.20068-8-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: tPNfmaoHPaSfPXAbkkq9zQ-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: hw/usb/ccid-card-passthru.c: In function ‘ccid_card_vscard_event’: hw/usb/ccid-card-passthru.c:314:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] 314 | switch (event) { | ^~~~~~ hw/usb/ccid-card-passthru.c:314:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] hw/usb/ccid-card-passthru.c:314:5: error: enumeration value ‘CHR_EVENT_CLOSED’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Gerd Hoffmann --- hw/usb/ccid-card-passthru.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 267ed9a8a0..190f268da2 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -318,6 +318,9 @@ static void ccid_card_vscard_event(void *opaque, int event) case CHR_EVENT_OPENED: DPRINTF(card, D_INFO, "%s: CHR_EVENT_OPENED\n", __func__); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298237 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4937138C for ; Tue, 17 Dec 2019 16:44:23 +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 AAB3921D7D for ; Tue, 17 Dec 2019 16:44:23 +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="KhjVgIQO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAB3921D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFxO-0004YB-7t for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:44:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52801) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFvm-0002WJ-UT for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFvl-0004t6-Pt for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:42220 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFvl-0004sb-J9 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:42:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600961; 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=1q0+8G9RTWbeMkR4IbHhx3lZKW72mNyCaGGTfMLDypg=; b=KhjVgIQOJeERrHh59Uic7l81qFudpOo5sS4d4+09CI7s4jfg3Z9LukbP5jJxfjBAT5DNFe rprGpolUU0GQbQ0LeEqolPp8MkQt0A/CrTdFtlUAkFjzZozKu4SVACinhyT8+bjXvHFG2U 4BAYA+qg3jnG+VLEHkq7zwfMj/Q2fh8= 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-374-FX8W9uU1OgGW6LcCMY_TFA-1; Tue, 17 Dec 2019 11:42:35 -0500 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 62959593D8; Tue, 17 Dec 2019 16:42:31 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B4AF68865; Tue, 17 Dec 2019 16:42:07 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 08/14] hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:02 +0100 Message-Id: <20191217163808.20068-9-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: FX8W9uU1OgGW6LcCMY_TFA-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC hw/usb/redirect.o hw/usb/redirect.c: In function ‘usbredir_chardev_event’: hw/usb/redirect.c:1361:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 1361 | switch (event) { | ^~~~~~ hw/usb/redirect.c:1361:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/usb/redirect.c:1361:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Gerd Hoffmann --- hw/usb/redirect.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index e0f5ca6f81..acc376cc95 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1370,6 +1370,9 @@ static void usbredir_chardev_event(void *opaque, int event) DPRINTF("chardev close\n"); qemu_bh_schedule(dev->chardev_close_bh); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21223109A for ; Tue, 17 Dec 2019 16:48: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 EBBDB21D7D for ; Tue, 17 Dec 2019 16:48: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="PXJo1+fb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBBDB21D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG10-0000of-9v for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:48:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53012) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFwD-00038J-7a for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFwC-0005Po-3A for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:09 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:24522 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFwA-0005Nq-Vv for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576600986; 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=LWPdmhlylc1YC5H9DvoZFc9kbqPgnBG8SfVBw2Anx8I=; b=PXJo1+fbrtrISifAMs+xnXJAp8Z8JpikzQ9xdtf/5hia42uzWLYq613BHhxy8RNBG4LCyc PezH1RB7JBytPSeY1shT8HWRy/hVNfQFOHqhHR2CgKNe+bEB1NZ27RHVJfo9uH5ez5lD/n lo3GM6fR5PSC091J5b8B6w9UjVxZ1yk= 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-253-itWGShRrPOK60sk3Fmx78g-1; Tue, 17 Dec 2019 11:43:03 -0500 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 6EDC86A2A6; Tue, 17 Dec 2019 16:42:57 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5A5B68865; Tue, 17 Dec 2019 16:42:31 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 09/14] monitor/qmp: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:03 +0100 Message-Id: <20191217163808.20068-10-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: itWGShRrPOK60sk3Fmx78g-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC monitor/qmp.o monitor/qmp.c: In function ‘monitor_qmp_event’: monitor/qmp.c:345:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 345 | switch (event) { | ^~~~~~ monitor/qmp.c:345:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] monitor/qmp.c:345:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Markus Armbruster --- monitor/qmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitor/qmp.c b/monitor/qmp.c index b67a8e7d1f..d666b07e68 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -365,6 +365,9 @@ static void monitor_qmp_event(void *opaque, int event) mon_refcount--; monitor_fdsets_cleanup(); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0115B138C for ; Tue, 17 Dec 2019 16:51:18 +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 7F87921D7D for ; Tue, 17 Dec 2019 16:51:18 +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="XXPTUo+H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F87921D7D 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG44-0004o5-SC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:51:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53345) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFwe-0003rb-9I for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFwd-0006AL-2g for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:36 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:39082 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFwc-00069z-V8 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576601014; 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=VieRlOSNQiL1buz6KYPsrx/GicOx3CeNAj0YsqGdShM=; b=XXPTUo+H1SSrwVRjqGB/PxhTyZVU5SYj9fXz40wEwwRrvktxkyr5cSE4jzBMWrJRv2nEv3 ToJ5Slb1C5fuosQhj+NrmHNhHA1AUwRLfkb5IDQpUgOGwqprz2AT7hivnfRx87bkA/L8an oUmCNcbkuE+xv6kWNi8RY8KkRGb5iFg= 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-40-SwlvgClkOOWB37uaT4TC1A-1; Tue, 17 Dec 2019 11:43:30 -0500 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 BF70F18B6394; Tue, 17 Dec 2019 16:43:25 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 039D368865; Tue, 17 Dec 2019 16:42:57 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 10/14] monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:04 +0100 Message-Id: <20191217163808.20068-11-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: SwlvgClkOOWB37uaT4TC1A-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC monitor/hmp.o monitor/hmp.c: In function ‘monitor_event’: monitor/hmp.c:1330:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 1330 | switch (event) { | ^~~~~~ cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé Acked-by: Dr. David Alan Gilbert Acked-by: Dr. David Alan Gilbert --- Cc: "Dr. David Alan Gilbert" --- monitor/hmp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monitor/hmp.c b/monitor/hmp.c index 8942e28933..d84238c120 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -1371,6 +1371,10 @@ static void monitor_event(void *opaque, int event) mon_refcount--; monitor_fdsets_cleanup(); break; + + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298255 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75142109A for ; Tue, 17 Dec 2019 16:51: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 4B18124655 for ; Tue, 17 Dec 2019 16:51: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="SGmsAHzC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B18124655 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG4C-0004te-54 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:51:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53549) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFx2-0004LZ-Bo for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFx1-0006pA-3U for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:00 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51850 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFx0-0006oR-Vr for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:43:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576601038; 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=KFfF62p0wtfpbuoQUs8fUU7/4Wwx9UtbFBKJZwS7G3M=; b=SGmsAHzClc+DEc2K6fdH7BqAXGTLei4Z+4ch+sOtlcdwyHP7Do9N2F0BsWc1I/P7VZdYMh CDoS+JD+VdAmD6cb4bkK1aPrwUnrci2ilyjBUWmt91apVFHujPnHqBoVLrTquVwKW24VZx wMJv22t4dsdG7KTbX4P7FL1JnkiZkXI= 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-1-7TX2JT0qOyim0MLRiwnoeg-1; Tue, 17 Dec 2019 11:43:54 -0500 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 16A93A0A6B; Tue, 17 Dec 2019 16:43:50 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B5E468877; Tue, 17 Dec 2019 16:43:25 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 11/14] net/vhost-user: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:05 +0100 Message-Id: <20191217163808.20068-12-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 7TX2JT0qOyim0MLRiwnoeg-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC net/vhost-user.o net/vhost-user.c: In function ‘net_vhost_user_event’: net/vhost-user.c:269:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 269 | switch (event) { | ^~~~~~ net/vhost-user.c:269:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] net/vhost-user.c:269:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Michael S. Tsirkin" Cc: Jason Wang --- net/vhost-user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 014199d600..383d68024e 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -294,6 +294,9 @@ static void net_vhost_user_event(void *opaque, int event) aio_bh_schedule_oneshot(ctx, chr_closed_bh, opaque); } break; + default: + /* Ignore */ + break; } if (err) { From patchwork Tue Dec 17 16:38:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298267 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AC88138C for ; Tue, 17 Dec 2019 16:54: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 50BFD21835 for ; Tue, 17 Dec 2019 16:54:15 +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="PRqc/4FS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50BFD21835 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG6w-0000kj-96 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:54:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53763) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFxR-0004hW-IQ for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFxQ-0007GE-B6 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:25 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52617 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFxQ-0007Fb-5l for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576601063; 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=MYVIpFLxZh/foCyP2XwIVnvo4LnIBsgaGRLRhMaYw14=; b=PRqc/4FSK0EezMtFucpWfaxMAvKfPmdv8O7abU8yVdZQ3Cch10WgYk1xIdXKN4cXn8Wqnz Wu9eWtTpKD9OXwBjKfhMz8woVhSUZJnb6vjvsG69P0UN0lt8b8DYStKP1ai2zwEW0AWryU WmEli4lyDxsVgxivK5++v+O4qIvxueE= 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-279-wgik6hrlOhGkOgAq2xvtuQ-1; Tue, 17 Dec 2019 11:44:19 -0500 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 770751023150; Tue, 17 Dec 2019 16:44:15 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7598D68877; Tue, 17 Dec 2019 16:43:50 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 12/14] vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:06 +0100 Message-Id: <20191217163808.20068-13-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: wgik6hrlOhGkOgAq2xvtuQ-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC s390x-softmmu/hw/block/vhost-user-blk.o hw/block/vhost-user-blk.c: In function ‘vhost_user_blk_event’: hw/block/vhost-user-blk.c:370:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 370 | switch (event) { | ^~~~~~ hw/block/vhost-user-blk.c:370:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/block/vhost-user-blk.c:370:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Michael S. Tsirkin" Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- hw/block/vhost-user-blk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 63da9bb619..4e2b2efdd3 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -383,6 +383,9 @@ static void vhost_user_blk_event(void *opaque, int event) s->watch = 0; } break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298261 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66270138C for ; Tue, 17 Dec 2019 16:54:05 +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 3A60421835 for ; Tue, 17 Dec 2019 16:54:05 +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="A3ynwGsw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A60421835 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG6m-0000St-4s for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:54:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54017) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFxr-0005AH-Gh for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFxq-0007co-AJ for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:51 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27750 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFxq-0007cH-6Q for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:44:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576601089; 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=cgmzu31Rt2ux67Lpas/rsmhkVxbL3amuZtxQ77YbDhM=; b=A3ynwGswjViAkFb7MBzdTpRJHjBvjoEn/64MlPl7XdH3ckSyUSUEE8644+j0+Qn3Q+E4IU 6WuH6aQLtvYjKxo0P82lfGIj8Epx4PFT43YvdbtsbLp4XRCZK8QKV50Zuc0//EZKL4OvFm 67SAAwUE/29Z+0Fm4uOexvKOZhmvQGk= 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-189-K55-sau0PYefSDfGkLWuzg-1; Tue, 17 Dec 2019 11:44:46 -0500 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 0F0631183E1A; Tue, 17 Dec 2019 16:44:41 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB86F68894; Tue, 17 Dec 2019 16:44:15 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [RFC PATCH 13/14] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler Date: Tue, 17 Dec 2019 17:38:07 +0100 Message-Id: <20191217163808.20068-14-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: K55-sau0PYefSDfGkLWuzg-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit when frontends ignore some events, to silent GCC the following warnings: CC s390x-softmmu/hw/char/terminal3270.o hw/char/terminal3270.c: In function ‘chr_event’: hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 156 | switch (event) { | ^~~~~~ hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daudé --- Cc: Cornelia Huck Cc: Halil Pasic Cc: Christian Borntraeger Cc: "Marc-André Lureau" Cc: Paolo Bonzini Cc: qemu-s390x@nongnu.org --- hw/char/terminal3270.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index 6859c1bcb2..9e59a2d92b 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -166,6 +166,9 @@ static void chr_event(void *opaque, int event) sch->curr_status.scsw.dstat = SCSW_DSTAT_DEVICE_END; css_conditional_io_interrupt(sch); break; + default: + /* Ignore */ + break; } } From patchwork Tue Dec 17 16:38:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11298257 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4E34138C for ; Tue, 17 Dec 2019 16:51: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 79BDE24655 for ; Tue, 17 Dec 2019 16:51: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="RdURpsDF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79BDE24655 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihG4E-0004vz-3F for patchwork-qemu-devel@patchwork.kernel.org; Tue, 17 Dec 2019 11:51:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54315) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihFyN-0005tp-Nt for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:45:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihFyJ-0008S7-8r for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:45:23 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:30751 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihFyI-0008Ov-Sa for qemu-devel@nongnu.org; Tue, 17 Dec 2019 11:45:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576601118; 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=eSKAIfhZrf4AzOzwxHf94n1FTTYtkdtk5h8oMtIkBhQ=; b=RdURpsDFoyI4zswFaaK8DtPBb0nzazYF2Ha8V5wpRa9yoFYcZq1JV8460/bhjC2CNe85iv W4HpwYtgVXXraby94QMXrOp4x3XQ0JQylbOPIvoJ8RnBxdmqGnnJFZQJdEOBxwHvMIvckG o/FXviZ0OVDgGvYEfMKCXkdifeCJygo= 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-243-1NDoE56uPtOn0SM-We1RLw-1; Tue, 17 Dec 2019 11:45:14 -0500 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 5C408800C80; Tue, 17 Dec 2019 16:45:09 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-147.brq.redhat.com [10.40.205.147]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B888B68882; Tue, 17 Dec 2019 16:44:41 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , qemu-devel@nongnu.org Subject: [PATCH 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Date: Tue, 17 Dec 2019 17:38:08 +0100 Message-Id: <20191217163808.20068-15-philmd@redhat.com> In-Reply-To: <20191217163808.20068-1-philmd@redhat.com> References: <20191217163808.20068-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: 1NDoE56uPtOn0SM-We1RLw-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 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: Peter Maydell , Li Zhijian , Paul Burton , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Alberto Garcia , Sagar Karandikar , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Joel Stanley , Samuel Thibault , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Antony Pavlov , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , Bastian Koppelmann , Cornelia Huck , Max Reitz , Zhang Chen , Michael Walle , Palmer Dabbelt , Thomas Huth , Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Chardev events are listed in the QEMUChrEvent enum. By using the enum in the IOEventHandler typedef we: - make the IOEventHandler type more explicit (this handler process out-of-band information, while the IOReadHandler is in-band), - help static code analyzers. This patch was produced with the following spatch script: @match@ expression backend, opaque, context, set_open; identifier fd_can_read, fd_read, fd_event, be_change; @@ qemu_chr_fe_set_handlers(backend, fd_can_read, fd_read, fd_event, be_change, opaque, context, set_open); @depends on match@ identifier opaque, event; identifier match.fd_event; @@ static -void fd_event(void *opaque, int event) +void fd_event(void *opaque, QEMUChrEvent event) { ... } Then the following files were manually modified: - include/chardev/char-fe.h - include/chardev/char.h - include/chardev/char-mux.h - chardev/char.c - chardev/char-mux.c Signed-off-by: Philippe Mathieu-Daudé --- Cc: "Gonglei (Arei)" Cc: "Marc-André Lureau" Cc: Paolo Bonzini Cc: "Alex Bennée" Cc: "Philippe Mathieu-Daudé" Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: "Michael S. Tsirkin" Cc: Kevin Wolf Cc: Max Reitz Cc: "Edgar E. Iglesias" Cc: Alistair Francis Cc: Antony Pavlov Cc: Igor Mitsyanko Cc: Fabien Chouteau Cc: KONRAD Frederic Cc: Peter Chubb Cc: Alberto Garcia Cc: Michael Walle Cc: Thomas Huth Cc: Joel Stanley Cc: Cornelia Huck Cc: Halil Pasic Cc: Christian Borntraeger Cc: Laurent Vivier Cc: Amit Shah Cc: Corey Minyard Cc: Paul Burton Cc: Aleksandar Rikalo Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Gerd Hoffmann Cc: Samuel Thibault Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Cc: Zhang Chen Cc: Li Zhijian Cc: Jason Wang Cc: qemu-arm@nongnu.org Cc: qemu-block@nongnu.org Cc: qemu-s390x@nongnu.org Cc: qemu-riscv@nongnu.org --- include/chardev/char-fe.h | 2 +- include/chardev/char-mux.h | 2 +- include/chardev/char.h | 4 ++-- backends/cryptodev-vhost-user.c | 2 +- chardev/char-mux.c | 8 ++++---- chardev/char.c | 4 ++-- gdbstub.c | 2 +- hw/arm/pxa2xx.c | 2 +- hw/arm/strongarm.c | 2 +- hw/block/vhost-user-blk.c | 2 +- hw/char/cadence_uart.c | 2 +- hw/char/digic-uart.c | 2 +- hw/char/escc.c | 2 +- hw/char/etraxfs_ser.c | 2 +- hw/char/exynos4210_uart.c | 2 +- hw/char/grlib_apbuart.c | 2 +- hw/char/imx_serial.c | 2 +- hw/char/ipoctal232.c | 2 +- hw/char/lm32_juart.c | 2 +- hw/char/lm32_uart.c | 2 +- hw/char/mcf_uart.c | 2 +- hw/char/milkymist-uart.c | 2 +- hw/char/nrf51_uart.c | 2 +- hw/char/pl011.c | 2 +- hw/char/serial.c | 2 +- hw/char/sh_serial.c | 2 +- hw/char/terminal3270.c | 2 +- hw/char/virtio-console.c | 2 +- hw/char/xilinx_uartlite.c | 2 +- hw/ipmi/ipmi_bmc_extern.c | 2 +- hw/mips/boston.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/riscv/riscv_htif.c | 2 +- hw/riscv/sifive_uart.c | 2 +- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-serial.c | 2 +- hw/usb/redirect.c | 2 +- monitor/hmp.c | 2 +- monitor/qmp.c | 2 +- net/filter-mirror.c | 2 +- net/vhost-user.c | 4 ++-- qtest.c | 2 +- tests/test-char.c | 6 +++--- tests/vhost-user-test.c | 2 +- 44 files changed, 52 insertions(+), 52 deletions(-) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 67601dc9a4..a553843364 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -4,7 +4,7 @@ #include "chardev/char.h" #include "qemu/main-loop.h" -typedef void IOEventHandler(void *opaque, int event); +typedef void IOEventHandler(void *opaque, QEMUChrEvent event); typedef int BackendChangeHandler(void *opaque); /* This is the backend as seen by frontend, the actual backend is diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h index 572cefd517..417fe32eed 100644 --- a/include/chardev/char-mux.h +++ b/include/chardev/char-mux.h @@ -56,6 +56,6 @@ typedef struct MuxChardev { object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX) void mux_set_focus(Chardev *chr, int focus); -void mux_chr_send_all_event(Chardev *chr, int event); +void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event); #endif /* CHAR_MUX_H */ diff --git a/include/chardev/char.h b/include/chardev/char.h index 087b202b62..00589a6025 100644 --- a/include/chardev/char.h +++ b/include/chardev/char.h @@ -210,7 +210,7 @@ void qemu_chr_be_update_read_handlers(Chardev *s, * * Send an event from the back end to the front end. */ -void qemu_chr_be_event(Chardev *s, int event); +void qemu_chr_be_event(Chardev *s, QEMUChrEvent event); int qemu_chr_add_client(Chardev *s, int fd); Chardev *qemu_chr_find(const char *name); @@ -273,7 +273,7 @@ typedef struct ChardevClass { void (*chr_accept_input)(Chardev *chr); void (*chr_set_echo)(Chardev *chr, bool echo); void (*chr_set_fe_open)(Chardev *chr, int fe_open); - void (*chr_be_event)(Chardev *s, int event); + void (*chr_be_event)(Chardev *s, QEMUChrEvent event); /* Return 0 if succeeded, 1 if failed */ int (*chr_machine_done)(Chardev *chr); } ChardevClass; diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c index d700934a0e..10e74c0b96 100644 --- a/backends/cryptodev-vhost-user.c +++ b/backends/cryptodev-vhost-user.c @@ -152,7 +152,7 @@ cryptodev_vhost_claim_chardev(CryptoDevBackendVhostUser *s, return chr; } -static void cryptodev_vhost_user_event(void *opaque, int event) +static void cryptodev_vhost_user_event(void *opaque, QEMUChrEvent event) { CryptoDevBackendVhostUser *s = opaque; CryptoDevBackend *b = CRYPTODEV_BACKEND(s); diff --git a/chardev/char-mux.c b/chardev/char-mux.c index 200c62a0d0..46c44af67c 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -117,7 +117,7 @@ static void mux_print_help(Chardev *chr) } } -static void mux_chr_send_event(MuxChardev *d, int mux_nr, int event) +static void mux_chr_send_event(MuxChardev *d, int mux_nr, QEMUChrEvent event) { CharBackend *be = d->backends[mux_nr]; @@ -126,7 +126,7 @@ static void mux_chr_send_event(MuxChardev *d, int mux_nr, int event) } } -static void mux_chr_be_event(Chardev *chr, int event) +static void mux_chr_be_event(Chardev *chr, QEMUChrEvent event) { MuxChardev *d = MUX_CHARDEV(chr); @@ -232,7 +232,7 @@ static void mux_chr_read(void *opaque, const uint8_t *buf, int size) } } -void mux_chr_send_all_event(Chardev *chr, int event) +void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event) { MuxChardev *d = MUX_CHARDEV(chr); int i; @@ -247,7 +247,7 @@ void mux_chr_send_all_event(Chardev *chr, int event) } } -static void mux_chr_event(void *opaque, int event) +static void mux_chr_event(void *opaque, QEMUChrEvent event) { mux_chr_send_all_event(CHARDEV(opaque), event); } diff --git a/chardev/char.c b/chardev/char.c index c4b6bbc55a..3b60799813 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -48,7 +48,7 @@ static Object *get_chardevs_root(void) return container_get(object_get_root(), "/chardevs"); } -static void chr_be_event(Chardev *s, int event) +static void chr_be_event(Chardev *s, QEMUChrEvent event) { CharBackend *be = s->be; @@ -59,7 +59,7 @@ static void chr_be_event(Chardev *s, int event) be->chr_event(be->opaque, event); } -void qemu_chr_be_event(Chardev *s, int event) +void qemu_chr_be_event(Chardev *s, QEMUChrEvent event) { /* Keep track if the char device is open */ switch (event) { diff --git a/gdbstub.c b/gdbstub.c index 4cf8af365e..ce304ff482 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -3171,7 +3171,7 @@ static void gdb_chr_receive(void *opaque, const uint8_t *buf, int size) } } -static void gdb_chr_event(void *opaque, int event) +static void gdb_chr_event(void *opaque, QEMUChrEvent event) { int i; GDBState *s = (GDBState *) opaque; diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index cdafde2f76..950ff4239a 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -1955,7 +1955,7 @@ static void pxa2xx_fir_rx(void *opaque, const uint8_t *buf, int size) pxa2xx_fir_update(s); } -static void pxa2xx_fir_event(void *opaque, int event) +static void pxa2xx_fir_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 6bee034914..c6776e8479 100644 --- a/hw/arm/strongarm.c +++ b/hw/arm/strongarm.c @@ -1093,7 +1093,7 @@ static void strongarm_uart_receive(void *opaque, const uint8_t *buf, int size) strongarm_uart_update_int_status(s); } -static void strongarm_uart_event(void *opaque, int event) +static void strongarm_uart_event(void *opaque, QEMUChrEvent event) { StrongARMUARTState *s = opaque; if (event == CHR_EVENT_BREAK) { diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 4e2b2efdd3..f4e7a53688 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -361,7 +361,7 @@ static gboolean vhost_user_blk_watch(GIOChannel *chan, GIOCondition cond, return true; } -static void vhost_user_blk_event(void *opaque, int event) +static void vhost_user_blk_event(void *opaque, QEMUChrEvent event) { DeviceState *dev = opaque; VirtIODevice *vdev = VIRTIO_DEVICE(dev); diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 0e315b2376..51791bd217 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -348,7 +348,7 @@ static void uart_receive(void *opaque, const uint8_t *buf, int size) } } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { CadenceUARTState *s = opaque; uint8_t buf = '\0'; diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index 974a2619dd..033eba0a6a 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -131,7 +131,7 @@ static void uart_rx(void *opaque, const uint8_t *buf, int size) s->reg_rx = *buf; } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/char/escc.c b/hw/char/escc.c index 8f7bf322cb..c40c1d28f1 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -634,7 +634,7 @@ static void serial_receive1(void *opaque, const uint8_t *buf, int size) serial_receive_byte(s, buf[0]); } -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { ESCCChannelState *s = opaque; if (event == CHR_EVENT_BREAK) diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c index 15ac12ef22..f34f767c60 100644 --- a/hw/char/etraxfs_ser.c +++ b/hw/char/etraxfs_ser.c @@ -202,7 +202,7 @@ static int serial_can_receive(void *opaque) return sizeof(s->rx_fifo) - s->rx_fifo_len; } -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index d6b6b62366..7e5c5ce789 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -528,7 +528,7 @@ static void exynos4210_uart_receive(void *opaque, const uint8_t *buf, int size) } -static void exynos4210_uart_event(void *opaque, int event) +static void exynos4210_uart_event(void *opaque, QEMUChrEvent event) { Exynos4210UartState *s = (Exynos4210UartState *)opaque; diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c index fe3cbf41a3..8e59c3bc6e 100644 --- a/hw/char/grlib_apbuart.c +++ b/hw/char/grlib_apbuart.c @@ -155,7 +155,7 @@ static void grlib_apbuart_receive(void *opaque, const uint8_t *buf, int size) } } -static void grlib_apbuart_event(void *opaque, int event) +static void grlib_apbuart_event(void *opaque, QEMUChrEvent event) { trace_grlib_apbuart_event(event); } diff --git a/hw/char/imx_serial.c b/hw/char/imx_serial.c index fddde9b43d..d09c210709 100644 --- a/hw/char/imx_serial.c +++ b/hw/char/imx_serial.c @@ -323,7 +323,7 @@ static void imx_receive(void *opaque, const uint8_t *buf, int size) imx_put_data(opaque, *buf); } -static void imx_event(void *opaque, int event) +static void imx_event(void *opaque, QEMUChrEvent event) { if (event == CHR_EVENT_BREAK) { imx_put_data(opaque, URXD_BRK | URXD_FRMERR | URXD_ERR); diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c index 66c163ba26..80e9dff701 100644 --- a/hw/char/ipoctal232.c +++ b/hw/char/ipoctal232.c @@ -503,7 +503,7 @@ static void hostdev_receive(void *opaque, const uint8_t *buf, int size) } } -static void hostdev_event(void *opaque, int event) +static void hostdev_event(void *opaque, QEMUChrEvent event) { SCC2698Channel *ch = opaque; switch (event) { diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c index e0b1bd6555..da9dd5668b 100644 --- a/hw/char/lm32_juart.c +++ b/hw/char/lm32_juart.c @@ -104,7 +104,7 @@ static int juart_can_rx(void *opaque) return !(s->jrx & JRX_FULL); } -static void juart_event(void *opaque, int event) +static void juart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c index 32f29c44cf..8d7a475c91 100644 --- a/hw/char/lm32_uart.c +++ b/hw/char/lm32_uart.c @@ -235,7 +235,7 @@ static int uart_can_rx(void *opaque) return !(s->regs[R_LSR] & LSR_DR); } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c index 58323baf43..2de3680b5d 100644 --- a/hw/char/mcf_uart.c +++ b/hw/char/mcf_uart.c @@ -256,7 +256,7 @@ static void mcf_uart_push_byte(mcf_uart_state *s, uint8_t data) mcf_uart_update(s); } -static void mcf_uart_event(void *opaque, int event) +static void mcf_uart_event(void *opaque, QEMUChrEvent event) { mcf_uart_state *s = (mcf_uart_state *)opaque; diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c index c358ca07f3..1c7b61480e 100644 --- a/hw/char/milkymist-uart.c +++ b/hw/char/milkymist-uart.c @@ -180,7 +180,7 @@ static int uart_can_rx(void *opaque) return !(s->regs[R_STAT] & STAT_RX_EVT); } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/char/nrf51_uart.c b/hw/char/nrf51_uart.c index 2777afe366..b67fd21089 100644 --- a/hw/char/nrf51_uart.c +++ b/hw/char/nrf51_uart.c @@ -245,7 +245,7 @@ static int uart_can_receive(void *opaque) return s->rx_started ? (UART_FIFO_LENGTH - s->rx_fifo_len) : 0; } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { NRF51UARTState *s = NRF51_UART(opaque); diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 84ad8ff9fb..23cd544cc5 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -280,7 +280,7 @@ static void pl011_receive(void *opaque, const uint8_t *buf, int size) pl011_put_fifo(opaque, *buf); } -static void pl011_event(void *opaque, int event) +static void pl011_event(void *opaque, QEMUChrEvent event) { if (event == CHR_EVENT_BREAK) pl011_put_fifo(opaque, 0x400); diff --git a/hw/char/serial.c b/hw/char/serial.c index b4aa250950..992b5ee944 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -634,7 +634,7 @@ static void serial_receive1(void *opaque, const uint8_t *buf, int size) serial_update_irq(s); } -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { SerialState *s = opaque; DPRINTF("event %x\n", event); diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c index 07dc16be13..167f4d8cb9 100644 --- a/hw/char/sh_serial.c +++ b/hw/char/sh_serial.c @@ -358,7 +358,7 @@ static void sh_serial_receive1(void *opaque, const uint8_t *buf, int size) } } -static void sh_serial_event(void *opaque, int event) +static void sh_serial_event(void *opaque, QEMUChrEvent event) { sh_serial_state *s = opaque; if (event == CHR_EVENT_BREAK) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index 9e59a2d92b..4ae9e1cff2 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -142,7 +142,7 @@ static void terminal_read(void *opaque, const uint8_t *buf, int size) } } -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { Terminal3270 *t = opaque; CcwDevice *ccw_dev = CCW_DEVICE(t); diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index d3f7ba36fe..35e31a4515 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -145,7 +145,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size) virtio_serial_write(port, buf, size); } -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { VirtConsole *vcon = opaque; VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 2c47275068..aa6bf02e21 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -206,7 +206,7 @@ static int uart_can_rx(void *opaque) return s->rx_fifo_len < sizeof(s->rx_fifo); } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 9d67e6a4a5..4dfb3ae8f5 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -379,7 +379,7 @@ static void receive(void *opaque, const uint8_t *buf, int size) handle_hw_op(ibe, hw_op); } -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { IPMIBmcExtern *ibe = opaque; IPMIInterface *s = ibe->parent.intf; diff --git a/hw/mips/boston.c b/hw/mips/boston.c index ca7d813a52..29b476b4bd 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -98,7 +98,7 @@ enum boston_plat_reg { PLAT_SYS_CTL = 0x48, }; -static void boston_lcd_event(void *opaque, int event) +static void boston_lcd_event(void *opaque, QEMUChrEvent event) { BostonState *s = opaque; if (event == CHR_EVENT_OPENED && !s->lcd_inited) { diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 783cd99848..72c03baa8e 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -545,7 +545,7 @@ static void malta_fpga_reset(void *opaque) snprintf(s->display_text, 9, " "); } -static void malta_fgpa_display_event(void *opaque, int event) +static void malta_fgpa_display_event(void *opaque, QEMUChrEvent event) { MaltaFPGAState *s = opaque; diff --git a/hw/riscv/riscv_htif.c b/hw/riscv/riscv_htif.c index 4f7b11dc37..ca87a5cf9f 100644 --- a/hw/riscv/riscv_htif.c +++ b/hw/riscv/riscv_htif.c @@ -96,7 +96,7 @@ static void htif_recv(void *opaque, const uint8_t *buf, int size) * Called by the char dev to supply special events to the HTIF console. * Not used for HTIF. */ -static void htif_event(void *opaque, int event) +static void htif_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/riscv/sifive_uart.c b/hw/riscv/sifive_uart.c index a403ae90f5..9350482662 100644 --- a/hw/riscv/sifive_uart.c +++ b/hw/riscv/sifive_uart.c @@ -162,7 +162,7 @@ static int uart_can_rx(void *opaque) return s->rx_fifo_len < sizeof(s->rx_fifo); } -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 190f268da2..cfaddf7f45 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -307,7 +307,7 @@ static void ccid_card_vscard_read(void *opaque, const uint8_t *buf, int size) } } -static void ccid_card_vscard_event(void *opaque, int event) +static void ccid_card_vscard_event(void *opaque, QEMUChrEvent event) { PassthruState *card = opaque; diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 497f932a5a..3504e6505a 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -461,7 +461,7 @@ static void usb_serial_read(void *opaque, const uint8_t *buf, int size) s->recv_used += size; } -static void usb_serial_event(void *opaque, int event) +static void usb_serial_event(void *opaque, QEMUChrEvent event) { USBSerialState *s = opaque; diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index acc376cc95..d5f85851b9 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1354,7 +1354,7 @@ static void usbredir_chardev_read(void *opaque, const uint8_t *buf, int size) usbredirparser_do_write(dev->parser); } -static void usbredir_chardev_event(void *opaque, int event) +static void usbredir_chardev_event(void *opaque, QEMUChrEvent event) { USBRedirDevice *dev = opaque; diff --git a/monitor/hmp.c b/monitor/hmp.c index d84238c120..ad9a599a88 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -1322,7 +1322,7 @@ static void monitor_read(void *opaque, const uint8_t *buf, int size) cur_mon = old_mon; } -static void monitor_event(void *opaque, int event) +static void monitor_event(void *opaque, QEMUChrEvent event) { Monitor *mon = opaque; MonitorHMP *hmp_mon = container_of(mon, MonitorHMP, common); diff --git a/monitor/qmp.c b/monitor/qmp.c index d666b07e68..1c7cbbfff0 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -337,7 +337,7 @@ static QDict *qmp_greeting(MonitorQMP *mon) ver, cap_list); } -static void monitor_qmp_event(void *opaque, int event) +static void monitor_qmp_event(void *opaque, QEMUChrEvent event) { QDict *data; MonitorQMP *mon = opaque; diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 8d36009c53..d83e815545 100644 --- a/net/filter-mirror.c +++ b/net/filter-mirror.c @@ -132,7 +132,7 @@ static void redirector_chr_read(void *opaque, const uint8_t *buf, int size) } } -static void redirector_chr_event(void *opaque, int event) +static void redirector_chr_event(void *opaque, QEMUChrEvent event) { NetFilterState *nf = opaque; MirrorState *s = FILTER_REDIRECTOR(nf); diff --git a/net/vhost-user.c b/net/vhost-user.c index 383d68024e..051e1dbd6e 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -218,7 +218,7 @@ static gboolean net_vhost_user_watch(GIOChannel *chan, GIOCondition cond, return TRUE; } -static void net_vhost_user_event(void *opaque, int event); +static void net_vhost_user_event(void *opaque, QEMUChrEvent event); static void chr_closed_bh(void *opaque) { @@ -249,7 +249,7 @@ static void chr_closed_bh(void *opaque) } } -static void net_vhost_user_event(void *opaque, int event) +static void net_vhost_user_event(void *opaque, QEMUChrEvent event) { const char *name = opaque; NetClientState *ncs[MAX_QUEUE_NUM]; diff --git a/qtest.c b/qtest.c index 8b50e2783e..12432f99cf 100644 --- a/qtest.c +++ b/qtest.c @@ -722,7 +722,7 @@ static int qtest_can_read(void *opaque) return 1024; } -static void qtest_event(void *opaque, int event) +static void qtest_event(void *opaque, QEMUChrEvent event) { int i; diff --git a/tests/test-char.c b/tests/test-char.c index 45e42af290..3afc9b1b8d 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -54,7 +54,7 @@ static void fe_read(void *opaque, const uint8_t *buf, int size) quit = true; } -static void fe_event(void *opaque, int event) +static void fe_event(void *opaque, QEMUChrEvent event) { FeHandler *h = opaque; bool new_open_state; @@ -633,7 +633,7 @@ typedef struct { static void -char_socket_event(void *opaque, int event) +char_socket_event(void *opaque, QEMUChrEvent event) { CharSocketTestData *data = opaque; data->event = event; @@ -1006,7 +1006,7 @@ static void char_socket_client_test(gconstpointer opaque) } static void -count_closed_event(void *opaque, int event) +count_closed_event(void *opaque, QEMUChrEvent event) { int *count = opaque; if (event == CHR_EVENT_CLOSED) { diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 91ea373ba5..2324b964ad 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -499,7 +499,7 @@ static TestServer *test_server_new(const gchar *name) return server; } -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { TestServer *s = opaque;