From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576689812; cv=none; d=zohomail.com; s=zohoarc; b=P0vavCjrlYAI9i0tvdrk3E/OZ1ZtsDsWSp6g7+TNQHohzkjfcPb615/RhXysZe5895mONWWd7aQkLshDeWlhN3GdIycrKqJAymlWQ97GguRsi918O8reFRiS4rXdfjeGmcSAFV/+yW0dFh+AIB0Rn9/f8n7OQWbH/uTGpd+GNjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576689812; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Rhz4RPxPQ1vIc+WeKxKoufDlvutrmYap4D2gdrkuO4c=; b=leXmiprUi5jmL65BToEWWcac+s+I2JLrPies0m/qG78eg13G6zfhoO9h95fOmsFLwUBic52qCqZ2NAdcd7f2Z+gKV1U6e6Ft7uo6QCeltYoGEMKEhQhM+G+xB/qc6PgLDufS3NFrzyI/AJVMsi9Xm/gVvyFovHeEvFMnYtY6a6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576689812290949.1623933863665; Wed, 18 Dec 2019 09:23:32 -0800 (PST) Received: from localhost ([::1]:58100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd2o-0001hU-3F for importer@patchew.org; Wed, 18 Dec 2019 12:23:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37885) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0L-0007k0-MA for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:20:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0I-0008TC-O0 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:20:57 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:28037 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 1ihd0I-0008Or-7m for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:20:54 -0500 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-125-33cw4hSXMpWhfEe4tLQhMQ-1; Wed, 18 Dec 2019 12:20:52 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7E8CEDC20; Wed, 18 Dec 2019 17:20:49 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAAA51001281; Wed, 18 Dec 2019 17:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689653; 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=Rhz4RPxPQ1vIc+WeKxKoufDlvutrmYap4D2gdrkuO4c=; b=bGW0Qa5UUI0+JsIn8D+UXgwiNoH5NDQL7VUNONVSOvcj8XfmdAC859Jl/OxUNH4XdLKeCP ktihfj4xoSsimJsVOvv1i19kmGQ18V/9yN/ToShm1W502qqflNt+4m5RKtBoWRE4FZdLId 2JQUPc0Nv3+c394Zxhr7IgE86ixvvZY= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/14] hw/ipmi: Remove unnecessary declarations Date: Wed, 18 Dec 2019 18:19:56 +0100 Message-Id: <20191218172009.8868-2-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 33cw4hSXMpWhfEe4tLQhMQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: qemu-trivial@nongnu.org, Corey Minyard , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Corey Minyard Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Since we don't use these methods before defining them, no need to forward-declare them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Corey Minyard Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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; =20 -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) { --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576689813; cv=none; d=zohomail.com; s=zohoarc; b=Y4EZ9KbBdtsSZNgaVB+WclZ+NUZY3s1ErpDBKRXSgw5wICs5DCxOO0L2nclLKnqm/cNKEi1l2xx33T6aJApLnQ27KBQBHbkAXpkMncjSGD8KiiDPyu8rl8+my82cL6gNtyQCDrV0C9KJmFy5k+FXmMN2Yk46Gy1xDfrOT7QPMLg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576689813; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dgf9utv5iIdUp6bijyWhIucupNguK7s0JQXj95uL2G0=; b=jH7xF3fWRcUn8ED6VKPCed4CXNLqRQac+T+AXdLU2ZrF5tS3KiyR2si6Pg5P1bbVEAO9E7t4qNisdm7G3u9nVuOXT1xZ4QajrRZc7bq2+v32Q1qPWUpciRu/K8BJrMZJIHGRFcrIYBrW9l11RHTCufleJmjv9nAjVOrygObsjH8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576689812970553.6433914286981; Wed, 18 Dec 2019 09:23:32 -0800 (PST) Received: from localhost ([::1]:58098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd2p-0001dE-51 for importer@patchew.org; Wed, 18 Dec 2019 12:23:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38071) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0N-0007k9-02 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0K-00009e-7E for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:20:58 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:35690 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 1ihd0J-00005X-Q0 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:20:55 -0500 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-421-m5t037RpNl6jBOk9RpqtYA-1; Wed, 18 Dec 2019 12:20:52 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3DEF8107ACC5; Wed, 18 Dec 2019 17:20:51 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10A9310016DA; Wed, 18 Dec 2019 17:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689655; 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=dgf9utv5iIdUp6bijyWhIucupNguK7s0JQXj95uL2G0=; b=DSsV0QqTG9Wlc2DheACHplHRlM4g6WM6kPkqJaWwjKOkctFs9daC6AYtA/0DNKg4gVl0rH bhqcaLpfRfynChaskzK/c3gOjkAWi/GT5Sm64kAEKu6WNiG9h/bjf4MaE5oE4jxnAwkT6U 3zsHHAxMnjQdOdGGxZ+BRVZBtMPoRN8= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:19:57 +0100 Message-Id: <20191218172009.8868-3-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: m5t037RpNl6jBOk9RpqtYA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Corey Minyard Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: hw/ipmi/ipmi_bmc_extern.c: In function =E2=80=98chr_event=E2=80=99: hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value =E2=80=98CHR_EV= ENT_BREAK=E2=80=99 not handled in switch [-Werror=3Dswitch] 389 | switch (event) { | ^~~~~~ hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value =E2=80=98CHR_EV= ENT_MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value =E2=80=98CHR_EV= ENT_MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Corey Minyard Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Richard Henderson --- v2: Add all missing enums Cc: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 450926e5fb..adf2afe728 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -435,6 +435,12 @@ static void chr_event(void *opaque, int event) k->handle_rsp(s, ibe->outbuf[0], ibe->inbuf + 1, 3); } break; + + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576689828; cv=none; d=zohomail.com; s=zohoarc; b=MLijK6AWDBbkqjzU0GnSjYVyRLz9R8QJR9KRoLyhB2T+js929YKPc6FZDyub+w2rr+tmZXZMrgu/zAfOnKt3iVcnYpeHgegUTBUY36Ax4VMZzJ2O/7sOhl92PDZqx4tGWY93+EFhLQxVJIdywPpUkXW3nLIYpnWuf3H0hOZeUlc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576689828; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9ky3L34wejGcJOlarYpvmPgF6QEhFeFdZ1gZXpXoMAo=; b=foY/nSNW0TdQYpnG0ue1ODftdIkoHfmXQblpnWuGQPEmr0ogtrdB5AWNxLTfRwRX03VFgKlZ1ql5vp9vvk9wEvmZmPsMgcbHfDrKjH+neG7AfX0N8NFeeEjsIN8XqXV9SX7yfc7QODyc1ISMli7iOwOd4yOx78AvI5b/PfchrZ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576689828700598.6711748731735; Wed, 18 Dec 2019 09:23:48 -0800 (PST) Received: from localhost ([::1]:58122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd35-0002JK-9G for importer@patchew.org; Wed, 18 Dec 2019 12:23:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38541) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0R-0007qm-5b for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0P-0000XZ-SV for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:02 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46018 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 1ihd0P-0000Tj-Cs for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:01 -0500 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-163-TtA3OU3bPdCFHfmAGQgMxQ-1; Wed, 18 Dec 2019 12:20:57 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8677718543A1; Wed, 18 Dec 2019 17:20:56 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9EF871001281; Wed, 18 Dec 2019 17:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689660; 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=9ky3L34wejGcJOlarYpvmPgF6QEhFeFdZ1gZXpXoMAo=; b=Juq8jQrf6v5flZXkxL20QcbQfb44pwWOgvHqGQzAPHz1OxLPxYVA1+wpSpGD9fnJz1LBlr oMga6J7NaoF2UFG+Wi2dBPDOF8/f3Y/i1+YFCtFhy54r8w0EUuJy3HV4U/ND+0i9v3dd4l By3CSUUqr7yzpTuzMFWJXukq915dAAQ= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 03/14] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:19:58 +0100 Message-Id: <20191218172009.8868-4-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: TtA3OU3bPdCFHfmAGQgMxQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: Cornelia Huck , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC s390x-softmmu/hw/char/terminal3270.o hw/char/terminal3270.c: In function =E2=80=98chr_event=E2=80=99: hw/char/terminal3270.c:156:5: error: enumeration value =E2=80=98CHR_EVENT= _BREAK=E2=80=99 not handled in switch [-Werror=3Dswitch] 156 | switch (event) { | ^~~~~~ hw/char/terminal3270.c:156:5: error: enumeration value =E2=80=98CHR_EVENT= _MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/char/terminal3270.c:156:5: error: enumeration value =E2=80=98CHR_EVENT= _MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: Cornelia Huck Cc: Halil Pasic Cc: Christian Borntraeger Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Cc: qemu-s390x@nongnu.org --- hw/char/terminal3270.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index 6859c1bcb2..2aab04fd4b 100644 --- a/hw/char/terminal3270.c +++ b/hw/char/terminal3270.c @@ -166,6 +166,11 @@ static void chr_event(void *opaque, int event) sch->curr_status.scsw.dstat =3D SCSW_DSTAT_DEVICE_END; css_conditional_io_interrupt(sch); break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690006; cv=none; d=zohomail.com; s=zohoarc; b=UzoIp+x5NTAKx/BZf14wkvvus1h6vFp5x5LbwWE6mAk1l2HlwqsnAEYywDXuIzrOaA2XsRDanKpchASu2RsT4rmGgncMDA/bffWp6yWqSscBi18D9+e8rpJm6DJJ0X5n2DO2e1AR1SvLqxa5GbGr9FZAOL+k0+kpTC8gHkhFqI4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690006; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CoOrTKj3h9+tvWmM1nSYpX3LSWNw7p9uAeDqW51BO5k=; b=go/1/2QwRzEN7rZJ5zRbvRVHQx33nC8ADceSpJZYUJpmAI5LfTRtS537SlD81r5BuNc05z9OixS0pxhc1P7TbCMDIIj1x+dlgyZlxB/CMYBOQDBH88bYcRTGY4zk4UJyK1nqCvL8GITlKGcj4mI9Bp45mCKs226lsQwXMxt8CCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690006320423.93965707636323; Wed, 18 Dec 2019 09:26:46 -0800 (PST) Received: from localhost ([::1]:58227 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd5w-0005ya-Ts for importer@patchew.org; Wed, 18 Dec 2019 12:26:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39062) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0V-0007wS-7w for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0S-0000lm-R5 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:06 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:39595 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 1ihd0S-0000i2-Kw for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:04 -0500 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-256-U6jhqM2pPy6AbGHctHoo2w-1; Wed, 18 Dec 2019 12:21:02 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 20E1D801E66; Wed, 18 Dec 2019 17:21:01 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9D4010018FF; Wed, 18 Dec 2019 17:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689664; 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=CoOrTKj3h9+tvWmM1nSYpX3LSWNw7p9uAeDqW51BO5k=; b=g+RCm+OR5e3LKQ2irn6ZlLXcSlB6r2tl8rmYqJ8ZyOhtBb2qGT31IVcJkiIDBh6RCOezxQ DkV1pJlvSichC2jhPla28Tvw1wWBNc2+Q3Cm4OthsBEAVWqXWIahBMjH3uMyZZpEXJZGSD OMUBPXLLjixWnNtuxnpiIrKGZX/38OU= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:19:59 +0100 Message-Id: <20191218172009.8868-5-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: U6jhqM2pPy6AbGHctHoo2w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: Samuel Thibault , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: hw/usb/dev-serial.c: In function =E2=80=98usb_serial_event=E2=80=99: hw/usb/dev-serial.c:468:5: error: enumeration value =E2=80=98CHR_EVENT_MU= X_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] 468 | switch (event) { | ^~~~~~ hw/usb/dev-serial.c:468:5: error: enumeration value =E2=80=98CHR_EVENT_MU= X_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: Gerd Hoffmann Cc: Samuel Thibault --- hw/usb/dev-serial.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 45cc74128a..2ba6870b37 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -479,6 +479,10 @@ static void usb_serial_event(void *opaque, int event) usb_device_detach(&s->dev); } break; + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690281; cv=none; d=zohomail.com; s=zohoarc; b=F27f8GaOEfESxBJEzVk3kjdqzKYthgdVyuNDipwFSPbN8RFNK1/P2RbAO25WeRfwMWuhIkW08aWwA9jLmmYiy9YyvXzL9AmxXZDM4syIUo56u5OdLgiLjZzROsWOfr6cpcMHQB+KTzzEZVkZyRGNMv+W3eeZWpwyQWzo+/V54a0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690281; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bDqio0xiAFXo/Gi21+yp1UJm9tLT+EmeqrNxy9ay1tU=; b=iRnCHBrPZdr6mybTTCWK/DvHD6veAnFKlVHxZ/STQ0bgpyov/QelEGKtDUyB+WSgWvy+oNIPt8q0iQz53priN9F3wD7d3z+zkbP7QlTc5msVOld6OkjdXUD5tAC2pUDnKrrOguYuosqOtYBWBZ3yo2dUo6stEGrxVQn8ROHym30= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157669028146482.44300640983704; Wed, 18 Dec 2019 09:31:21 -0800 (PST) Received: from localhost ([::1]:58300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdAN-000346-W6 for importer@patchew.org; Wed, 18 Dec 2019 12:31:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39385) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0X-000803-9m for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0V-00013w-Tn for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:09 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:21209 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 1ihd0V-00010O-MN for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:07 -0500 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-252-aHFrzBwbNaGFNhbFEgkjGQ-1; Wed, 18 Dec 2019 12:21:05 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C058107ACC5 for ; Wed, 18 Dec 2019 17:21:05 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EBE91001B00; Wed, 18 Dec 2019 17:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689667; 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=bDqio0xiAFXo/Gi21+yp1UJm9tLT+EmeqrNxy9ay1tU=; b=b1qGOmsl4vrexLXovRcgHDQSHpT2HVAQa5kQyDEzl37AGrPewsHsSS1Fpa22mWvoYtLiwT hdDdswiAWy00g2wolcxjvHrJQM/OG0aur2NDav5zWwFpbvKUndp7rWgEuK29td5yEX/b2R /rhH10i5sqErwX68nF2042D70syMlG8= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 05/14] hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:00 +0100 Message-Id: <20191218172009.8868-6-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: aHFrzBwbNaGFNhbFEgkjGQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC hw/usb/redirect.o hw/usb/redirect.c: In function =E2=80=98usbredir_chardev_event=E2=80=99: hw/usb/redirect.c:1361:5: error: enumeration value =E2=80=98CHR_EVENT_BRE= AK=E2=80=99 not handled in switch [-Werror=3Dswitch] 1361 | switch (event) { | ^~~~~~ hw/usb/redirect.c:1361:5: error: enumeration value =E2=80=98CHR_EVENT_MUX= _IN=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/usb/redirect.c:1361:5: error: enumeration value =E2=80=98CHR_EVENT_MUX= _OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: Gerd Hoffmann --- hw/usb/redirect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index e0f5ca6f81..ddc1a59cb4 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1370,6 +1370,11 @@ static void usbredir_chardev_event(void *opaque, int= event) DPRINTF("chardev close\n"); qemu_bh_schedule(dev->chardev_close_bh); break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576689980; cv=none; d=zohomail.com; s=zohoarc; b=iQ2O4PdcLZWuTc10ZBH9NZJpIGRuumu0vTLj4S5fPxIeEMovfNfxx4iG+qrRurk7PL577kLKjMQfTm5EU9t/WIJigRAHrJpZB05TsnOcCAdJv5+l5WY6X5YnjNFUwlqK3sJnGDLbiYENrpmrvztbwcLwJ/qKD4qPYwcctlijJzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576689980; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZDnsYuHXcA5F8gE2N73wPFpPTrE4itMcCBaT7un2uo4=; b=IvjSPfSrqQlM8AJcQVpdG+nXVccMjApT9kWiQ+Dp4ozL5z0S1XZDnN1ZH2R2fY9geGR5iywX0lYswMihR1oeH/aMdqIWJ21Ivn89WOeNxv9cgGCgxEQ8WB1dTDTNfWcL0XYApHxL5RWgacTpz7Jn65qr3WnQkR0ZYVYKmn6Wom0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576689980712442.81259815032047; Wed, 18 Dec 2019 09:26:20 -0800 (PST) Received: from localhost ([::1]:58198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd5W-0005Xe-A7 for importer@patchew.org; Wed, 18 Dec 2019 12:26:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39762) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0Z-00084F-Pd for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0Y-0001Gt-GV for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:11 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:45494 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 1ihd0X-0001D6-V8 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:10 -0500 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-393-BtuITw_uP1CcHTYkWpaBgQ-1; Wed, 18 Dec 2019 12:21:08 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B16218543A1 for ; Wed, 18 Dec 2019 17:21:07 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 64FD11000322; Wed, 18 Dec 2019 17:21:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689669; 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=ZDnsYuHXcA5F8gE2N73wPFpPTrE4itMcCBaT7un2uo4=; b=HFMeUIQOFxor/XWBjAxueHBJQ0ybS4oDD/mz7RHhMlnfmWv87ngV5e5F2pQV6wULymIXFS 43SQeMGlxC7e+yEjt/tvu+Ozd1oTCRxHXs8yZR9DkpXFGOacFkTbfYs6yPCy3okhR8Tr2e s+vGlLy0hBBxAhgKvq6WUR+iXRWh1f4= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 06/14] ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:01 +0100 Message-Id: <20191218172009.8868-7-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: BtuITw_uP1CcHTYkWpaBgQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: hw/usb/ccid-card-passthru.c: In function =E2=80=98ccid_card_vscard_event= =E2=80=99: hw/usb/ccid-card-passthru.c:314:5: error: enumeration value =E2=80=98CHR_= EVENT_MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] 314 | switch (event) { | ^~~~~~ hw/usb/ccid-card-passthru.c:314:5: error: enumeration value =E2=80=98CHR_= EVENT_MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/usb/ccid-card-passthru.c:314:5: error: enumeration value =E2=80=98CHR_= EVENT_CLOSED=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: Gerd Hoffmann --- hw/usb/ccid-card-passthru.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 267ed9a8a0..e53696c07a 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -318,6 +318,11 @@ static void ccid_card_vscard_event(void *opaque, int e= vent) case CHR_EVENT_OPENED: DPRINTF(card, D_INFO, "%s: CHR_EVENT_OPENED\n", __func__); break; + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + case CHR_EVENT_CLOSED: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576689996; cv=none; d=zohomail.com; s=zohoarc; b=fYPlSt7CRQjmmUb/oZ8/ie02wKFp0spauhVoUeVm+DSJ8/Hzec5yPNkQr2wrN3mmP/X4K5TAisJlYoS4wA3hM6E2qeFqtUAw16MM6lxkc8uYyeHRG/xO/jh1dClBC8P2vvfJZEQRk/mcaY1N2CilQW+DcCPWMPvymIzcvr3LeJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576689996; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5eNNR2GX+QGc0fgt9VdwTFNCLM6z7ykoh5rit7OIAM0=; b=H7q2cmlUwQkK3rQ1XnOKCBS7eCvWoHI6cA8TVvqBG0wlyYunpZ6KcILgVOzRLsT6w+CtlXYnxYeoS1zw71e3mTy8UCCZs1eidbYXngUOjVvqF4IoE4O4FPXE3SN9hjR+Jkh+ExXsVYNYDTChn3SwL538zBdYfoc2OyWX8jEWZyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576689996650103.03990039823191; Wed, 18 Dec 2019 09:26:36 -0800 (PST) Received: from localhost ([::1]:58224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd5n-0005n7-6n for importer@patchew.org; Wed, 18 Dec 2019 12:26:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39996) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0b-00086q-Cy for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0a-0001Pg-7P for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:13 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31975 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 1ihd0Z-0001MV-Ph for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:11 -0500 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-135-1U48ji7rNgOJjoWqoklmsw-1; Wed, 18 Dec 2019 12:21:10 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1CA7A1083E44; Wed, 18 Dec 2019 17:21:09 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBAF81000322; Wed, 18 Dec 2019 17:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689671; 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=5eNNR2GX+QGc0fgt9VdwTFNCLM6z7ykoh5rit7OIAM0=; b=RkcCWVcXyaK2wItDD8g+/CE/VZ/i5iPWf2oxNnxYLMJLemMakHWOPXFpFbkX5IcvjTsVrs iyz4GdlkqHQusrTAyDidcd+vBz/p7cpUHBELbwJyoVS9o6rRG0uAOQEqufeRMMrsdYFifW QrGAX64QP+pG1Zm5TLQsP591srABtwg= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 07/14] vhost-user-crypto: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:02 +0100 Message-Id: <20191218172009.8868-8-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 1U48ji7rNgOJjoWqoklmsw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: "Gonglei \(Arei\)" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC backends/cryptodev-vhost-user.o backends/cryptodev-vhost-user.c: In function =E2=80=98cryptodev_vhost_use= r_event=E2=80=99: backends/cryptodev-vhost-user.c:163:5: error: enumeration value =E2=80=98= CHR_EVENT_BREAK=E2=80=99 not handled in switch [-Werror=3Dswitch] 163 | switch (event) { | ^~~~~~ backends/cryptodev-vhost-user.c:163:5: error: enumeration value =E2=80=98= CHR_EVENT_MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] backends/cryptodev-vhost-user.c:163:5: error: enumeration value =E2=80=98= CHR_EVENT_MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: "Gonglei (Arei)" --- backends/cryptodev-vhost-user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-use= r.c index b344283940..f1b407955f 100644 --- a/backends/cryptodev-vhost-user.c +++ b/backends/cryptodev-vhost-user.c @@ -171,6 +171,11 @@ static void cryptodev_vhost_user_event(void *opaque, i= nt event) b->ready =3D false; cryptodev_vhost_user_stop(queues, s); break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690017; cv=none; d=zohomail.com; s=zohoarc; b=CXCqitsALggUSSe7HMvKGFw2im6arG/Ia4H3kvPPi2tY6zIZHpIPeOgu4ONElcRzc4ICfj+gNdbruB2vGG4+dvhKhYBRzkIoUEXoVqKO2o4lK0yIkbi4k6fs9llICMLZa8bt8I9SUHVFAYYN9rUxPk1V/+2KYGnhmR0hBz4AzSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690017; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y5I5yjLi2lqLk5dGu6+jKIx4tIcuciKPF591w+XQAxw=; b=neJPPeG1PeT7YUK1KDcz8uAKSCOoL1jvxoMishhlbdHvsIAYJmBsvEmGKtMgc2cp3+BZzjq3pEaNYCRMx/LrulIXyDudEGhXopuKjOA9f8sHPAMa2r0aarYR96NrhiSbGv33FCkMlhAlBD5g84DiUJoLx8f/Hy2AX6hHzXNIncA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690017015995.3401886717802; Wed, 18 Dec 2019 09:26:57 -0800 (PST) Received: from localhost ([::1]:58228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd67-0006Ad-9d for importer@patchew.org; Wed, 18 Dec 2019 12:26:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0i-0008Hf-0G for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0g-0001wg-8R for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48034 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 1ihd0f-0001si-PI for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:17 -0500 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-286-M7NVhF5oM9qtt7xfwx7OeA-1; Wed, 18 Dec 2019 12:21:13 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1EF001005510 for ; Wed, 18 Dec 2019 17:21:13 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75A631001281; Wed, 18 Dec 2019 17:21:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689677; 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=y5I5yjLi2lqLk5dGu6+jKIx4tIcuciKPF591w+XQAxw=; b=Gt+qurFu8vFETOwj1r9Ftw7IIddjJyGwwfI56nrbrL8RrG5e59IwM+54HGtZvRNKr8QwXP ZLp3qtsGE6vFtiz26A8OKQ/ZhiEPhdZ7Dbe90tW/dzbZ0SGv8rrcYmkFblQZiPP0m0xK2G lS8D4QIiU096veJxvNIiVN+BL+nv/eo= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 08/14] vhost-user-net: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:03 +0100 Message-Id: <20191218172009.8868-9-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: M7NVhF5oM9qtt7xfwx7OeA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: Jason Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC net/vhost-user.o net/vhost-user.c: In function =E2=80=98net_vhost_user_event=E2=80=99: net/vhost-user.c:269:5: error: enumeration value =E2=80=98CHR_EVENT_BREAK= =E2=80=99 not handled in switch [-Werror=3Dswitch] 269 | switch (event) { | ^~~~~~ net/vhost-user.c:269:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_I= N=E2=80=99 not handled in switch [-Werror=3Dswitch] net/vhost-user.c:269:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_O= UT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michael S. Tsirkin --- v2: Add all missing enums Cc: "Michael S. Tsirkin" Cc: Jason Wang --- net/vhost-user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/vhost-user.c b/net/vhost-user.c index 014199d600..c54c9c7d4c 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -294,6 +294,11 @@ static void net_vhost_user_event(void *opaque, int eve= nt) aio_bh_schedule_oneshot(ctx, chr_closed_bh, opaque); } break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } =20 if (err) { --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690397; cv=none; d=zohomail.com; s=zohoarc; b=A/n/3Ex7CPi4YFrpe0vY31ftT5MOhpNJXPOUKazzNhBy3KHrAN43Y9n+HNllnbxLOxFpoN8Rb9TC4GPZdMcP8sEsPl28ZI7vfqU9/gD6ldeYI+vIXItLAi+T09ZlxRvD5OTLE/Fz52uqz539oes47cBQqpDV7tTOdt0aDBrMKV4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690397; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=htyW4UjMjeL2KbbIyootrNOzzzsOj88mXPWJ8ci1ypY=; b=JwRzYVcbViNQzJzASwYdROuuIpbAPnPv6X0CKDiwIRjoxBytART+t6omAhQgeuN47Ft/AvIC2pSYkWRnShwQ+Mqq8tTf4/m4W88pOePoz2lnPZz1weuIcSfB4YWh+kENTaQXKUHCkmx1Qb2lN14If7Iv10vWvRddAsDEiFlS/78= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690397805329.87028801482734; Wed, 18 Dec 2019 09:33:17 -0800 (PST) Received: from localhost ([::1]:58326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdCG-00051r-Ei for importer@patchew.org; Wed, 18 Dec 2019 12:33:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41215) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0k-0008Lw-SU for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0j-000299-2H for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:22 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:26838 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 1ihd0i-00024s-EM for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:20 -0500 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-278-BJ2yD53dNfCDw01Zfp7zkA-1; Wed, 18 Dec 2019 12:21:16 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4B02107ACC7; Wed, 18 Dec 2019 17:21:15 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73C641001B00; Wed, 18 Dec 2019 17:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689679; 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=htyW4UjMjeL2KbbIyootrNOzzzsOj88mXPWJ8ci1ypY=; b=KcNN7q1GieSUvGYQ+tWJLgh/GwLaZVVCCiJOZXmewbrAtLrnKbNuxvTZVWGfkY7cjmto7X +urmoecEf0PdJgcq8OaCjyMGR4yQhWqSLaElhBD7D40cGUyVGQ6DO/H3CNY/S4sSfnEsEI RAEhGOfSCzNN2FXoWCg/FpQcQgjR078= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 09/14] vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:04 +0100 Message-Id: <20191218172009.8868-10-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: BJ2yD53dNfCDw01Zfp7zkA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: Kevin Wolf , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC s390x-softmmu/hw/block/vhost-user-blk.o hw/block/vhost-user-blk.c: In function =E2=80=98vhost_user_blk_event=E2= =80=99: hw/block/vhost-user-blk.c:370:5: error: enumeration value =E2=80=98CHR_EV= ENT_BREAK=E2=80=99 not handled in switch [-Werror=3Dswitch] 370 | switch (event) { | ^~~~~~ hw/block/vhost-user-blk.c:370:5: error: enumeration value =E2=80=98CHR_EV= ENT_MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/block/vhost-user-blk.c:370:5: error: enumeration value =E2=80=98CHR_EV= ENT_MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: "Michael S. Tsirkin" Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org --- hw/block/vhost-user-blk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 63da9bb619..ccaf2ad978 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -383,6 +383,11 @@ static void vhost_user_blk_event(void *opaque, int eve= nt) s->watch =3D 0; } break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690150; cv=none; d=zohomail.com; s=zohoarc; b=dQLPR1Qy9nHzI+1eiPPfqnh7RAROYSEx+fwEeZLf3xc9TrOOGTu817yo0Rmc9QKDp5Bp7Ljr258QHkt91361hGf91nReNKe8HyrM+5cz2+9CZ65P7nfGl3pnV8nEEVNbrmIh0f9JOHJy/JG+PfpwgNJ4O+OBHo9WBebw4HY4arM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690150; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vQir1Bu4djF2L75/RDABXHIXExcVR8gxzEYPcEdbi74=; b=Q9wnvUb/MC0sPAzOwZt3PUN4aGig0EQUdi9n+FyyJqgiksy50p6xmWWh/SZXdA8X+lT19k8tBiN6I6uImx5Y/KE2l2Yoj4pr32inAEFUNwTbapVT4pKwAyvgin1GGcauInk/aUXbDIUDyafN7ysmdBj+sVnSC6sls40qjteUJ9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690150212302.52406828957976; Wed, 18 Dec 2019 09:29:10 -0800 (PST) Received: from localhost ([::1]:58260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd8G-0000l7-8f for importer@patchew.org; Wed, 18 Dec 2019 12:29:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41539) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0o-0008R9-4j for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0m-0002L4-ME for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:25 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:43290 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 1ihd0l-0002Gy-SJ for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:24 -0500 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-296-gzPN2xfjOZaNe8pP0Yqr4w-1; Wed, 18 Dec 2019 12:21:21 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B10E11005512; Wed, 18 Dec 2019 17:21:20 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0E01A1000322; Wed, 18 Dec 2019 17:21:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689683; 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=vQir1Bu4djF2L75/RDABXHIXExcVR8gxzEYPcEdbi74=; b=d80ZvVUhEjtZ1P95PwuaKT4cn2HKzpc8bliAFpFuHeso6D7R+BH0R23V+WVpBMoyvPi8yo 4hjL9IcRJHoaEDcVWLZuqjlbaNfMbk6Ay9v2XkBEyQeLGFO5vJFRN3ZLyvuKjo48mLzfWp JzyEPGbCbLZ3GwHQmLRWm2gL/7ULKqc= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 10/14] virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:05 +0100 Message-Id: <20191218172009.8868-11-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: gzPN2xfjOZaNe8pP0Yqr4w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: Laurent Vivier , Amit Shah , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC hw/char/virtio-console.o hw/char/virtio-console.c: In function =E2=80=98chr_event=E2=80=99: hw/char/virtio-console.c:154:5: error: enumeration value =E2=80=98CHR_EVE= NT_BREAK=E2=80=99 not handled in switch [-Werror=3Dswitch] 154 | switch (event) { | ^~~~~~ hw/char/virtio-console.c:154:5: error: enumeration value =E2=80=98CHR_EVE= NT_MUX_IN=E2=80=99 not handled in switch [-Werror=3Dswitch] hw/char/virtio-console.c:154:5: error: enumeration value =E2=80=98CHR_EVE= NT_MUX_OUT=E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: "Michael S. Tsirkin" Cc: Laurent Vivier Cc: Amit Shah Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini --- hw/char/virtio-console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index c13649f1ef..cbb304d270 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -162,6 +162,11 @@ static void chr_event(void *opaque, int event) } virtio_serial_close(port); break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690482; cv=none; d=zohomail.com; s=zohoarc; b=PSH3Q0bxIr+POh8CSl8q+mju/07xXW7Fz+FxTpMt9AuUYpgEIyTJV7GVKHzNNFjqrz4Zrl3/+NaHOjZC+4QfsE+Fc2Xz3bH5B6CkvUJcV/AFTwv61UAVvnZatXO0VT0VgaBxmn45FR86S8YxImxq/6vLZtzRzQqOraePA7iqSvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PgWY8pvM33gKDqjh/x3hslhckBy9l8kZmncqEq3lHmU=; b=ko9+VnxK4CCNjdLUuNItOhEgnLZYazYKN0MUart+7llW+dDHB8ap5XBCTxEMCslEn8oR+c2VwquVDN0eKIrn9/NiDA6Qo4WG5nFxeeezH1n9bxiWTpbCD3QAZp54fWn/0byVUVTV8auKzhTwVS8egvVjlTCY+l1odzYVslFXJEU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690482831734.2292188155236; Wed, 18 Dec 2019 09:34:42 -0800 (PST) Received: from localhost ([::1]:58338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdDd-0006XD-09 for importer@patchew.org; Wed, 18 Dec 2019 12:34:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42159) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0t-00008L-Ns for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0r-0002gb-BO for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:30 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27897 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 1ihd0q-0002ce-VQ for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:29 -0500 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-402-tKUW57K8OrShzXT1Jp75EA-1; Wed, 18 Dec 2019 12:21:25 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 619C1593A0 for ; Wed, 18 Dec 2019 17:21:24 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 166AB1000322; Wed, 18 Dec 2019 17:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689688; 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=PgWY8pvM33gKDqjh/x3hslhckBy9l8kZmncqEq3lHmU=; b=KtFMFgRRgHrhpJHVXNOT9WwJic214au9gBoJ7nMUDSJ3utu1iuWFsujudOYNdKjOKiAVdk NVPtSnsHx/uLYpXB/396t3edFbmgyw5lC6WHduOQJ/nkUqQtZ3Q8dctf43tUmKOFB51FZX i7Uu9SPCzNpeJxL6gdpb8SdvNmtai+s= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 11/14] monitor/qmp: Explicit we ignore few QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:06 +0100 Message-Id: <20191218172009.8868-12-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: tKUW57K8OrShzXT1Jp75EA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: CC monitor/qmp.o monitor/qmp.c: In function =E2=80=98monitor_qmp_event=E2=80=99: monitor/qmp.c:345:5: error: enumeration value =E2=80=98CHR_EVENT_BREAK=E2= =80=99 not handled in switch [-Werror=3Dswitch] 345 | switch (event) { | ^~~~~~ monitor/qmp.c:345:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_IN= =E2=80=99 not handled in switch [-Werror=3Dswitch] monitor/qmp.c:345:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_OUT= =E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Markus Armbruster --- v2: Add all missing enums Cc: Markus Armbruster --- monitor/qmp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monitor/qmp.c b/monitor/qmp.c index b67a8e7d1f..6c46be40f8 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -365,6 +365,11 @@ static void monitor_qmp_event(void *opaque, int event) mon_refcount--; monitor_fdsets_cleanup(); break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690277; cv=none; d=zohomail.com; s=zohoarc; b=lIKTTwvalJngDhc7uDmL+78nzEgocUYJa0DA7Wx349EeS67IupFF2lzLa6SaZCpa3phQZ+siuLhJFAnERv7wv5yQdjaG5+af97YHQr94zLpOWjZF7yXNZ9F0hN0oYzyPZICKCwflFq7POnMNuMN08GtVp0DK3qaOh8k7ou2B4ts= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690277; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mTCF7sW1w6Y2PZ1xCWcrAxTpx1mo+iIlUacORX0SktM=; b=LnX781PDGfKPcpSm1yIKeQGVSM1VvpP+1z4rt1TYpx6PAxMJIzj0JZVeIMDkhxskrepnywYF7AB1Q9j/T/upJuyLoOSnapvM7fTCwKeprY2GW0jdbA2aMBle/O8gh0JVkMuzp666r307DMEe3LDI4cIteTQj8mU41/QnuLtodjA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690277680651.8138115442092; Wed, 18 Dec 2019 09:31:17 -0800 (PST) Received: from localhost ([::1]:58298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdAI-0002ty-Pw for importer@patchew.org; Wed, 18 Dec 2019 12:31:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41992) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0s-00006c-7U for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0q-0002eG-Vl for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:29 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27781 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 1ihd0q-0002aF-IY for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:28 -0500 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-405-zzWUmRjBOs6u1GiwVSbcHQ-1; Wed, 18 Dec 2019 12:21:26 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B308C18543A1 for ; Wed, 18 Dec 2019 17:21:25 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA6F21000322; Wed, 18 Dec 2019 17:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689688; 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=mTCF7sW1w6Y2PZ1xCWcrAxTpx1mo+iIlUacORX0SktM=; b=TxAhqH8WmIPeKteGNJ+OqPoZ5RaIaHZ2qS87EzIIo8GHUY5dz6wYyEwggWDLwY7Jnl4JpD 52PQix8axMYQfsAY+KoDUFncmyjZLo9W3xRflO4QhIky70D8qk4zWxKZ07iDtfXNXGcCrF gDWIPYU+QIG5ta+GSvIMteqoQbcg1YM= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 12/14] monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:07 +0100 Message-Id: <20191218172009.8868-13-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: zzWUmRjBOs6u1GiwVSbcHQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit an event ignored by this frontend, to silent the following GCC warning: CC monitor/hmp.o monitor/hmp.c: In function =E2=80=98monitor_event=E2=80=99: monitor/hmp.c:1330:5: error: enumeration value =E2=80=98CHR_EVENT_BREAK= =E2=80=99 not handled in switch [-Werror=3Dswitch] 1330 | switch (event) { | ^~~~~~ cc1: all warnings being treated as errors Acked-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing values 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..706ebe7074 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; + + case CHR_EVENT_BREAK: + /* Ignored */ + break; } } =20 --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690561; cv=none; d=zohomail.com; s=zohoarc; b=NEUsOqvhD1611RoPHJF5OS4f1v31y2m9hF2fcw4qW+iKb4apEoJS/F37xpfXh+XjjO8axptWcJMo8WYz+hX1VvsDWpLAWx6wikl6V2Jck/8JFgRxaL/NkMv+Taxie9qwv/hAdYcqC767XeZLCk9iPRAsAcBjzLn81klPGvtp/jw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690561; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MlWpvWjMvO4W7C89QvDgz4j9AkXk/8NNuObfmzICgyo=; b=Bg1LZK3Jer6QFgEZKDuG+aKtPh1IvUrQoyaJ9T1Cs4ahOCAj65ieJ+973hP/QPq1IGcXwxOWUaleEWc8PlDEoXsMV37lWp8nnoJY/JtUAxOxF7IoEQZpE1heNX5jJORUFGy+1nFbAnIry6/24V84rtaV8/o0aWnCPvgcAeTH3tQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576690561225650.8615412437894; Wed, 18 Dec 2019 09:36:01 -0800 (PST) Received: from localhost ([::1]:58356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdEu-0007ZZ-38 for importer@patchew.org; Wed, 18 Dec 2019 12:36:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42350) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd0v-0000Ay-3Z for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd0t-0002q4-Ge for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:32 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:27502 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 1ihd0s-0002hM-0B for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:31 -0500 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-215-MfL1FuuHMLmkfoL4u8Fepg-1; Wed, 18 Dec 2019 12:21:28 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E441801E6C for ; Wed, 18 Dec 2019 17:21:27 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 177631000322; Wed, 18 Dec 2019 17:21:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689689; 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=MlWpvWjMvO4W7C89QvDgz4j9AkXk/8NNuObfmzICgyo=; b=FJR30WFaE5C8lyRNvBIraEoT0WVl0h+RQH1X5Hb7idc5XjJg36H9TIbABjdKWlgFQVcE9V 2Prv47IGgo4Ol1HS+v/b2iQCrezjurngSmJMOGEm1PJXiYQ1MgynV8s80jLYO2pgsB2NEO K1FVuY9sL4oJanaY0dRXsZUIrQzcCxQ= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 13/14] chardev/char: Explicit we ignore some QEMUChrEvent in IOEventHandler Date: Wed, 18 Dec 2019 18:20:08 +0100 Message-Id: <20191218172009.8868-14-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: MfL1FuuHMLmkfoL4u8Fepg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning: chardev/char.c: In function =E2=80=98qemu_chr_be_event=E2=80=99: chardev/char.c:65:5: error: enumeration value =E2=80=98CHR_EVENT_BREAK=E2= =80=99 not handled in switch [-Werror=3Dswitch] 65 | switch (event) { | ^~~~~~ chardev/char.c:65:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_IN= =E2=80=99 not handled in switch [-Werror=3Dswitch] chardev/char.c:65:5: error: enumeration value =E2=80=98CHR_EVENT_MUX_OUT= =E2=80=99 not handled in switch [-Werror=3Dswitch] cc1: all warnings being treated as errors Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- v2: Add all missing enums Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini --- chardev/char.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chardev/char.c b/chardev/char.c index 7b6b2cb123..739da1155b 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -69,6 +69,11 @@ void qemu_chr_be_event(Chardev *s, int event) case CHR_EVENT_CLOSED: s->be_open =3D 0; break; + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } =20 CHARDEV_GET_CLASS(s)->chr_be_event(s, event); --=20 2.21.0 From nobody Fri May 3 05:33:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576690645; cv=none; d=zohomail.com; s=zohoarc; b=QDn8YADvEJpKQhC7vlB7VrrCWMbcGrVROrULkqlP6Vl6IZPwyuow8xzaxzutORWHGg8AfM3PHNNUKq/U64cgag8vBh5F8DQuGX8klIcftZE4QeVlgW7x930V/deKkAOSK6pCoJNNVQFfW97wym6DwG4DmbqlLUU7yUeaTXgx1Vo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576690645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=525ClwqyHmAK0f1GceJlwmwpPfqMT3AVM4HwwB7KZ10=; b=CspatdScrZdXixoGPDdhqXomsBO7FWWw8aHz5FiFLifD+a1GW73UlUwC0OclJXTnmy14XQhpY6x4+ZIsPVG3Mio/tseG9wiZRsAXD50eGqjMqBPrvJTN5Px483lbWCJ9PA/V3x9K6cQfzuPlVSr44gLG1CXctvDWAbXp7N9sm3o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157669064548534.37047438061495; Wed, 18 Dec 2019 09:37:25 -0800 (PST) Received: from localhost ([::1]:58382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihdGF-0000aZ-LL for importer@patchew.org; Wed, 18 Dec 2019 12:37:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44458) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihd1S-0000nZ-UI for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:22:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihd1N-0004Kx-9s for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:22:05 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41973 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 1ihd1E-0004BY-5A for qemu-devel@nongnu.org; Wed, 18 Dec 2019 12:21:52 -0500 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-173-usGP6UGCPxa86cxFS3wPjg-1; Wed, 18 Dec 2019 12:21:47 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D404100550E; Wed, 18 Dec 2019 17:21:42 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-235.ams2.redhat.com [10.36.116.235]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 996DB1001281; Wed, 18 Dec 2019 17:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576689708; 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=525ClwqyHmAK0f1GceJlwmwpPfqMT3AVM4HwwB7KZ10=; b=GGmAKjOW8vBQAGrBsze+MoLMf4Q3+jxJ+LWVVl3kD0bqtnWTg3F+EkeAnNPR32y00jIB0+ A40KAVswRVSSLXMWmhtmJVsn8E7FGe27zNJhJcvzojN33motpSG9FOxwPsCLVtZM1pQAO0 eoRvQQDIiudgIyXew1IKmv5cf4hWqrk= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH v2 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Date: Wed, 18 Dec 2019 18:20:09 +0100 Message-Id: <20191218172009.8868-15-philmd@redhat.com> In-Reply-To: <20191218172009.8868-1-philmd@redhat.com> References: <20191218172009.8868-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: usGP6UGCPxa86cxFS3wPjg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable 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 , Sagar Karandikar , "Michael S. Tsirkin" , Jason Wang , KONRAD Frederic , Gerd Hoffmann , "Edgar E. Iglesias" , Paul Burton , Alberto Garcia , Li Zhijian , qemu-block@nongnu.org, Zhang Chen , Markus Armbruster , Halil Pasic , Christian Borntraeger , "Gonglei \(Arei\)" , Antony Pavlov , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Joel Stanley , Laurent Vivier , Corey Minyard , Amit Shah , Alistair Francis , "Dr. David Alan Gilbert" , Fabien Chouteau , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Peter Chubb , Samuel Thibault , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , Max Reitz , Thomas Huth , Michael Walle , Palmer Dabbelt , Aleksandar Markovic , Bastian Koppelmann , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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=C3=A9 Acked-by: Corey Minyard Acked-by: Cornelia Huck Reviewed-by: Marc-Andr=C3=A9 Lureau --- Cc: "Gonglei (Arei)" Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Cc: "Alex Benn=C3=A9e" Cc: "Philippe Mathieu-Daud=C3=A9" 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" =20 -typedef void IOEventHandler(void *opaque, int event); +typedef void IOEventHandler(void *opaque, QEMUChrEvent event); typedef int BackendChangeHandler(void *opaque); =20 /* 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) =20 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); =20 #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); =20 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-use= r.c index f1b407955f..6edada8e9e 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; } =20 -static void cryptodev_vhost_user_event(void *opaque, int event) +static void cryptodev_vhost_user_event(void *opaque, QEMUChrEvent event) { CryptoDevBackendVhostUser *s =3D opaque; CryptoDevBackend *b =3D 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) } } =20 -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 eve= nt) { CharBackend *be =3D d->backends[mux_nr]; =20 @@ -126,7 +126,7 @@ static void mux_chr_send_event(MuxChardev *d, int mux_n= r, int event) } } =20 -static void mux_chr_be_event(Chardev *chr, int event) +static void mux_chr_be_event(Chardev *chr, QEMUChrEvent event) { MuxChardev *d =3D MUX_CHARDEV(chr); =20 @@ -232,7 +232,7 @@ static void mux_chr_read(void *opaque, const uint8_t *b= uf, int size) } } =20 -void mux_chr_send_all_event(Chardev *chr, int event) +void mux_chr_send_all_event(Chardev *chr, QEMUChrEvent event) { MuxChardev *d =3D MUX_CHARDEV(chr); int i; @@ -247,7 +247,7 @@ void mux_chr_send_all_event(Chardev *chr, int event) } } =20 -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 739da1155b..4f598f8175 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"); } =20 -static void chr_be_event(Chardev *s, int event) +static void chr_be_event(Chardev *s, QEMUChrEvent event) { CharBackend *be =3D s->be; =20 @@ -59,7 +59,7 @@ static void chr_be_event(Chardev *s, int event) be->chr_event(be->opaque, event); } =20 -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) } } =20 -static void gdb_chr_event(void *opaque, int event) +static void gdb_chr_event(void *opaque, QEMUChrEvent event) { int i; GDBState *s =3D (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); } =20 -static void pxa2xx_fir_event(void *opaque, int event) +static void pxa2xx_fir_event(void *opaque, QEMUChrEvent event) { } =20 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, cons= t uint8_t *buf, int size) strongarm_uart_update_int_status(s); } =20 -static void strongarm_uart_event(void *opaque, int event) +static void strongarm_uart_event(void *opaque, QEMUChrEvent event) { StrongARMUARTState *s =3D opaque; if (event =3D=3D CHR_EVENT_BREAK) { diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index ccaf2ad978..98b383f90e 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; } =20 -static void vhost_user_blk_event(void *opaque, int event) +static void vhost_user_blk_event(void *opaque, QEMUChrEvent event) { DeviceState *dev =3D opaque; VirtIODevice *vdev =3D 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 *b= uf, int size) } } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { CadenceUARTState *s =3D opaque; uint8_t buf =3D '\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, i= nt size) s->reg_rx =3D *buf; } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } =20 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]); } =20 -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { ESCCChannelState *s =3D opaque; if (event =3D=3D 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; } =20 -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { =20 } 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) } =20 =20 -static void exynos4210_uart_event(void *opaque, int event) +static void exynos4210_uart_event(void *opaque, QEMUChrEvent event) { Exynos4210UartState *s =3D (Exynos4210UartState *)opaque; =20 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 u= int8_t *buf, int size) } } =20 -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 *bu= f, int size) imx_put_data(opaque, *buf); } =20 -static void imx_event(void *opaque, int event) +static void imx_event(void *opaque, QEMUChrEvent event) { if (event =3D=3D 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) } } =20 -static void hostdev_event(void *opaque, int event) +static void hostdev_event(void *opaque, QEMUChrEvent event) { SCC2698Channel *ch =3D 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); } =20 -static void juart_event(void *opaque, int event) +static void juart_event(void *opaque, QEMUChrEvent event) { } =20 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); } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } =20 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); } =20 -static void mcf_uart_event(void *opaque, int event) +static void mcf_uart_event(void *opaque, QEMUChrEvent event) { mcf_uart_state *s =3D (mcf_uart_state *)opaque; =20 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); } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } =20 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; } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { NRF51UARTState *s =3D NRF51_UART(opaque); =20 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); } =20 -static void pl011_event(void *opaque, int event) +static void pl011_event(void *opaque, QEMUChrEvent event) { if (event =3D=3D 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); } =20 -static void serial_event(void *opaque, int event) +static void serial_event(void *opaque, QEMUChrEvent event) { SerialState *s =3D 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 uint= 8_t *buf, int size) } } =20 -static void sh_serial_event(void *opaque, int event) +static void sh_serial_event(void *opaque, QEMUChrEvent event) { sh_serial_state *s =3D opaque; if (event =3D=3D CHR_EVENT_BREAK) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index 2aab04fd4b..f7aba12565 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) } } =20 -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { Terminal3270 *t =3D opaque; CcwDevice *ccw_dev =3D CCW_DEVICE(t); diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index cbb304d270..a7d34fe0ed 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); } =20 -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { VirtConsole *vcon =3D opaque; VirtIOSerialPort *port =3D 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); } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { =20 } diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index adf2afe728..16a4117ab0 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, i= nt size) handle_hw_op(ibe, hw_op); } =20 -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { IPMIBmcExtern *ibe =3D opaque; IPMIInterface *s =3D 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 =3D 0x48, }; =20 -static void boston_lcd_event(void *opaque, int event) +static void boston_lcd_event(void *opaque, QEMUChrEvent event) { BostonState *s =3D opaque; if (event =3D=3D 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, " "); } =20 -static void malta_fgpa_display_event(void *opaque, int event) +static void malta_fgpa_display_event(void *opaque, QEMUChrEvent event) { MaltaFPGAState *s =3D opaque; =20 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, i= nt 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) { =20 } 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); } =20 -static void uart_event(void *opaque, int event) +static void uart_event(void *opaque, QEMUChrEvent event) { } =20 diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index e53696c07a..3d40b700db 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 u= int8_t *buf, int size) } } =20 -static void ccid_card_vscard_event(void *opaque, int event) +static void ccid_card_vscard_event(void *opaque, QEMUChrEvent event) { PassthruState *card =3D opaque; =20 diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index 2ba6870b37..9646fe77da 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 +=3D size; } =20 -static void usb_serial_event(void *opaque, int event) +static void usb_serial_event(void *opaque, QEMUChrEvent event) { USBSerialState *s =3D opaque; =20 diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index ddc1a59cb4..0068aa8a19 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); } =20 -static void usbredir_chardev_event(void *opaque, int event) +static void usbredir_chardev_event(void *opaque, QEMUChrEvent event) { USBRedirDevice *dev =3D opaque; =20 diff --git a/monitor/hmp.c b/monitor/hmp.c index 706ebe7074..944fa9651e 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 =3D old_mon; } =20 -static void monitor_event(void *opaque, int event) +static void monitor_event(void *opaque, QEMUChrEvent event) { Monitor *mon =3D opaque; MonitorHMP *hmp_mon =3D container_of(mon, MonitorHMP, common); diff --git a/monitor/qmp.c b/monitor/qmp.c index 6c46be40f8..54c06ba824 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -337,7 +337,7 @@ static QDict *qmp_greeting(MonitorQMP *mon) ver, cap_list); } =20 -static void monitor_qmp_event(void *opaque, int event) +static void monitor_qmp_event(void *opaque, QEMUChrEvent event) { QDict *data; MonitorQMP *mon =3D 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 uin= t8_t *buf, int size) } } =20 -static void redirector_chr_event(void *opaque, int event) +static void redirector_chr_event(void *opaque, QEMUChrEvent event) { NetFilterState *nf =3D opaque; MirrorState *s =3D FILTER_REDIRECTOR(nf); diff --git a/net/vhost-user.c b/net/vhost-user.c index c54c9c7d4c..17532daaf3 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; } =20 -static void net_vhost_user_event(void *opaque, int event); +static void net_vhost_user_event(void *opaque, QEMUChrEvent event); =20 static void chr_closed_bh(void *opaque) { @@ -249,7 +249,7 @@ static void chr_closed_bh(void *opaque) } } =20 -static void net_vhost_user_event(void *opaque, int event) +static void net_vhost_user_event(void *opaque, QEMUChrEvent event) { const char *name =3D 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; } =20 -static void qtest_event(void *opaque, int event) +static void qtest_event(void *opaque, QEMUChrEvent event) { int i; =20 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 =3D true; } =20 -static void fe_event(void *opaque, int event) +static void fe_event(void *opaque, QEMUChrEvent event) { FeHandler *h =3D opaque; bool new_open_state; @@ -633,7 +633,7 @@ typedef struct { =20 =20 static void -char_socket_event(void *opaque, int event) +char_socket_event(void *opaque, QEMUChrEvent event) { CharSocketTestData *data =3D opaque; data->event =3D event; @@ -1006,7 +1006,7 @@ static void char_socket_client_test(gconstpointer opa= que) } =20 static void -count_closed_event(void *opaque, int event) +count_closed_event(void *opaque, QEMUChrEvent event) { int *count =3D opaque; if (event =3D=3D 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; } =20 -static void chr_event(void *opaque, int event) +static void chr_event(void *opaque, QEMUChrEvent event) { TestServer *s =3D opaque; =20 --=20 2.21.0