From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com,
"Michael S. Tsirkin" <mst@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"Zhenwei Pi" <pizhenwei@bytedance.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Amit Shah" <amit@kernel.org>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Clément Chigot" <chigot@adacore.com>,
"Frederic Konrad" <konrad.frederic@yahoo.fr>,
"Alberto Garcia" <berto@igalia.com>,
"Thomas Huth" <huth@tuxfamily.org>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Jason Herne" <jjherne@linux.ibm.com>,
"Yoshinori Sato" <yoshinori.sato@nifty.com>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Collin L. Walling" <walling@linux.ibm.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Anthony PERARD" <anthony@xenproject.org>,
"Paul Durrant" <paul@xen.org>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Corey Minyard" <minyard@acm.org>,
"Paul Burton" <paulburton@kernel.org>,
"Aleksandar Rikalo" <arikalo@gmail.com>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Weiwei Li" <liwei1518@gmail.com>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
"Michael Rolnik" <mrolnik@gmail.com>,
"Antony Pavlov" <antonynpavlov@gmail.com>,
"Joel Stanley" <joel@jms.id.au>,
"Vijai Kumar K" <vijai@behindbytes.com>,
"Samuel Tardieu" <sam@rfc1149.net>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Raphael Norwitz" <raphael@enfabrica.net>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"reviewer:vhost-user-scmi" <mzamazal@redhat.com>,
"Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Markus Armbruster" <armbru@redhat.com>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
"Zhang Chen" <zhangckid@gmail.com>,
"Li Zhijian" <lizhijian@fujitsu.com>,
"Jason Wang" <jasowang@redhat.com>,
"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Helge Deller" <deller@gmx.de>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Lukas Straub" <lukasstraub2@web.de>,
"open list:Sharp SL-5500 Co..." <qemu-arm@nongnu.org>,
"open list:S390 SCLP-backed..." <qemu-s390x@nongnu.org>,
"open list:sPAPR (pseries)" <qemu-ppc@nongnu.org>,
"open list:X86 Xen CPUs" <xen-devel@lists.xenproject.org>,
"open list:RISC-V TCG CPUs" <qemu-riscv@nongnu.org>,
"open list:virtiofs" <virtio-fs@lists.linux.dev>,
"open list:Rust-related patc..." <qemu-rust@nongnu.org>
Subject: Re: [PATCH] char: rename CharBackend->CharFrontend
Date: Tue, 21 Oct 2025 15:25:05 +0200 (CEST) [thread overview]
Message-ID: <01a51fe7-4414-e787-ddf5-5ede0c1e1e74@eik.bme.hu> (raw)
In-Reply-To: <20251021122533.721467-1-marcandre.lureau@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 6518 bytes --]
On Tue, 21 Oct 2025, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The actual backend is "Chardev", CharBackend is the frontend side of it,
> let's rename it for readability.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> chardev/chardev-internal.h | 12 +-
> include/chardev/char-fe.h | 67 +++++----
> include/chardev/char.h | 4 +-
> include/hw/char/avr_usart.h | 2 +-
> include/hw/char/bcm2835_aux.h | 2 +-
> include/hw/char/cadence_uart.h | 2 +-
> include/hw/char/cmsdk-apb-uart.h | 2 +-
> include/hw/char/digic-uart.h | 2 +-
> include/hw/char/escc.h | 2 +-
> include/hw/char/goldfish_tty.h | 2 +-
> include/hw/char/ibex_uart.h | 2 +-
> include/hw/char/imx_serial.h | 2 +-
> include/hw/char/max78000_uart.h | 2 +-
> include/hw/char/nrf51_uart.h | 2 +-
> include/hw/char/parallel.h | 2 +-
> include/hw/char/pl011.h | 2 +-
> include/hw/char/renesas_sci.h | 2 +-
> include/hw/char/riscv_htif.h | 2 +-
> include/hw/char/serial.h | 2 +-
> include/hw/char/shakti_uart.h | 2 +-
> include/hw/char/sifive_uart.h | 2 +-
> include/hw/char/stm32f2xx_usart.h | 2 +-
> include/hw/char/stm32l4x5_usart.h | 2 +-
> include/hw/misc/ivshmem-flat.h | 2 +-
> include/hw/qdev-properties-system.h | 2 +-
> include/hw/virtio/vhost-user-base.h | 2 +-
> include/hw/virtio/vhost-user-blk.h | 2 +-
> include/hw/virtio/vhost-user-fs.h | 2 +-
> include/hw/virtio/vhost-user-scmi.h | 2 +-
> include/hw/virtio/vhost-user-vsock.h | 2 +-
> include/hw/virtio/vhost-user.h | 8 +-
> include/hw/virtio/virtio-gpu.h | 2 +-
> include/hw/virtio/virtio-scsi.h | 2 +-
> include/system/qtest.h | 4 +-
> include/system/vhost-user-backend.h | 2 +-
> monitor/monitor-internal.h | 2 +-
> backends/cryptodev-vhost-user.c | 2 +-
> backends/rng-egd.c | 2 +-
> backends/tpm/tpm_emulator.c | 4 +-
> chardev/char-fe.c | 142 +++++++++----------
> chardev/char-hub.c | 18 +--
> chardev/char-mux.c | 40 +++---
> chardev/char.c | 8 +-
> gdbstub/system.c | 2 +-
> hw/arm/strongarm.c | 2 +-
> hw/char/debugcon.c | 2 +-
> hw/char/exynos4210_uart.c | 2 +-
> hw/char/grlib_apbuart.c | 2 +-
> hw/char/ipoctal232.c | 2 +-
> hw/char/mcf_uart.c | 2 +-
> hw/char/sclpconsole-lm.c | 2 +-
> hw/char/sclpconsole.c | 2 +-
> hw/char/sh_serial.c | 2 +-
> hw/char/spapr_vty.c | 2 +-
> hw/char/terminal3270.c | 2 +-
> hw/char/virtio-console.c | 2 +-
> hw/char/xen_console.c | 2 +-
> hw/char/xilinx_uartlite.c | 2 +-
> hw/core/qdev-properties-system.c | 16 +--
> hw/ipmi/ipmi_bmc_extern.c | 2 +-
> hw/mips/boston.c | 2 +-
> hw/mips/malta.c | 2 +-
> hw/misc/ivshmem-pci.c | 2 +-
> hw/ppc/spapr_rtas.c | 2 +-
> hw/riscv/riscv_hart.c | 2 +-
> hw/usb/ccid-card-passthru.c | 2 +-
> hw/usb/dev-serial.c | 2 +-
> hw/usb/redirect.c | 2 +-
> hw/virtio/vhost-stub.c | 2 +-
> hw/virtio/vhost-user.c | 20 +--
> net/colo-compare.c | 10 +-
> net/filter-mirror.c | 4 +-
> net/passt.c | 2 +-
> net/slirp.c | 2 +-
> net/vhost-user.c | 2 +-
> semihosting/console.c | 6 +-
> system/qtest.c | 20 +--
> target/hppa/sys_helper.c | 2 +-
> target/xtensa/xtensa-semi.c | 2 +-
> tests/qtest/vhost-user-test.c | 16 +--
> tests/unit/test-char.c | 198 +++++++++++++--------------
> tests/unit/test-yank.c | 12 +-
> rust/bindings/src/lib.rs | 4 +-
> rust/chardev/src/bindings.rs | 6 +-
> rust/chardev/src/chardev.rs | 26 ++--
> rust/hw/char/pl011/src/device.rs | 12 +-
> rust/hw/core/src/qdev.rs | 2 +-
> 87 files changed, 392 insertions(+), 393 deletions(-)
>
> diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h
> index 9752dd75f7..8ea10414ab 100644
> --- a/chardev/chardev-internal.h
> +++ b/chardev/chardev-internal.h
> @@ -37,9 +37,9 @@
> struct MuxChardev {
> Chardev parent;
> /* Linked frontends */
> - CharBackend *backends[MAX_MUX];
> - /* Linked backend */
> - CharBackend chr;
> + CharFrontend *frontends[MAX_MUX];
> + /* frontend of the underlying muxed chardev */
> + CharFrontend chr;
> unsigned long mux_bitset;
> int focus;
> bool term_got_escape;
> @@ -64,8 +64,8 @@ typedef struct HubCharBackend HubCharBackend;
> * `hub->backends` array
> */
> struct HubCharBackend {
> - HubChardev *hub;
> - CharBackend be;
> + HubChardev *hub;
> + CharFrontend fe;
> unsigned int be_ind;
> };
>
> @@ -108,7 +108,7 @@ DECLARE_INSTANCE_CHECKER(HubChardev, HUB_CHARDEV,
> #define CHARDEV_IS_HUB(chr) \
> object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_HUB)
>
> -bool mux_chr_attach_frontend(MuxChardev *d, CharBackend *b,
> +bool mux_chr_attach_frontend(MuxChardev *d, CharFrontend *c,
> unsigned int *tag, Error **errp);
> bool mux_chr_detach_frontend(MuxChardev *d, unsigned int tag);
> void mux_set_focus(Chardev *chr, unsigned int focus);
> diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
> index 8ef05b3dd0..cb28692f38 100644
> --- a/include/chardev/char-fe.h
> +++ b/include/chardev/char-fe.h
> @@ -8,12 +8,12 @@ typedef void IOEventHandler(void *opaque, QEMUChrEvent event);
> typedef int BackendChangeHandler(void *opaque);
>
> /**
> - * struct CharBackend - back end as seen by front end
> + * struct CharFrontend - back end as seen by front end
I stopped here, haven't read the rest of the patch but the above comment
seems to become inconsistent. Which is the front end and back end now?
Regards,
BALATON Zoltan
next prev parent reply other threads:[~2025-10-21 13:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 12:25 [PATCH] char: rename CharBackend->CharFrontend marcandre.lureau
2025-10-21 12:53 ` Peter Maydell
2025-10-21 13:49 ` Dr. David Alan Gilbert
2025-10-21 13:58 ` Marc-André Lureau
2025-10-21 14:23 ` Philippe Mathieu-Daudé
2025-10-21 14:27 ` Marc-André Lureau
2025-10-21 15:33 ` Paolo Bonzini
2025-10-21 13:25 ` BALATON Zoltan [this message]
2025-10-21 13:30 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01a51fe7-4414-e787-ddf5-5ede0c1e1e74@eik.bme.hu \
--to=balaton@eik.bme.hu \
--cc=alex.bennee@linaro.org \
--cc=alistair@alistair23.me \
--cc=amit@kernel.org \
--cc=anthony@xenproject.org \
--cc=antonynpavlov@gmail.com \
--cc=arei.gonglei@huawei.com \
--cc=arikalo@gmail.com \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=borntraeger@linux.ibm.com \
--cc=chigot@adacore.com \
--cc=dave@treblig.org \
--cc=dbarboza@ventanamicro.com \
--cc=deller@gmx.de \
--cc=dmitry.osipenko@collabora.com \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=farosas@suse.de \
--cc=gustavo.romero@linaro.org \
--cc=harshpb@linux.ibm.com \
--cc=huth@tuxfamily.org \
--cc=i.mitsyanko@gmail.com \
--cc=jasowang@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=jjherne@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=konrad.frederic@yahoo.fr \
--cc=liwei1518@gmail.com \
--cc=lizhijian@fujitsu.com \
--cc=lukasstraub2@web.de \
--cc=lvivier@redhat.com \
--cc=magnus.damm@gmail.com \
--cc=manos.pitsidianakis@linaro.org \
--cc=marcandre.lureau@redhat.com \
--cc=minyard@acm.org \
--cc=mrolnik@gmail.com \
--cc=mst@redhat.com \
--cc=mzamazal@redhat.com \
--cc=npiggin@gmail.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=palmer@dabbelt.com \
--cc=pasic@linux.ibm.com \
--cc=paul@xen.org \
--cc=paulburton@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=pizhenwei@bytedance.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=qemu-rust@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=raphael@enfabrica.net \
--cc=richard.henderson@linaro.org \
--cc=sam@rfc1149.net \
--cc=samuel.thibault@ens-lyon.org \
--cc=sgarzare@redhat.com \
--cc=sstabellini@kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@redhat.com \
--cc=vijai@behindbytes.com \
--cc=virtio-fs@lists.linux.dev \
--cc=walling@linux.ibm.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yoshinori.sato@nifty.com \
--cc=zhangckid@gmail.com \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).