From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvqWX-0005xA-IZ for qemu-devel@nongnu.org; Fri, 10 Feb 2012 08:28:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvqWW-0007mh-8Q for qemu-devel@nongnu.org; Fri, 10 Feb 2012 08:28:25 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:42837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvqWW-0007mQ-3K for qemu-devel@nongnu.org; Fri, 10 Feb 2012 08:28:24 -0500 Received: by pbbro12 with SMTP id ro12so2752436pbb.4 for ; Fri, 10 Feb 2012 05:28:23 -0800 (PST) Message-ID: <4F351B73.9020001@codemonkey.ws> Date: Fri, 10 Feb 2012 07:28:19 -0600 From: Anthony Liguori MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] char: Add a QemuChrHandlers struct to initialise chardev handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list On 02/10/2012 07:19 AM, Amit Shah wrote: > Instead of passing each handler in the qemu_add_handlers() function, > create a struct of handlers that can be passed to the function instead. > > Signed-off-by: Amit Shah Why? > --- > gdbstub.c | 9 +++++++-- > hw/ccid-card-passthru.c | 11 +++++++---- > hw/debugcon.c | 2 +- > hw/escc.c | 9 +++++++-- > hw/etraxfs_ser.c | 13 +++++++++---- > hw/grlib_apbuart.c | 12 +++++++----- > hw/ivshmem.c | 28 ++++++++++++++++++++++------ > hw/lm32_juart.c | 8 +++++++- > hw/lm32_uart.c | 8 +++++++- > hw/mcf_uart.c | 9 +++++++-- > hw/milkymist-uart.c | 8 +++++++- > hw/pl011.c | 9 +++++++-- > hw/pxa2xx.c | 13 +++++++++---- > hw/qdev-properties.c | 2 +- > hw/serial.c | 9 +++++++-- > hw/sh_serial.c | 12 +++++++++--- > hw/spapr_vty.c | 9 ++++++--- > hw/strongarm.c | 12 +++++++----- > hw/usb-serial.c | 9 +++++++-- > hw/virtio-console.c | 9 +++++++-- > hw/xen_console.c | 16 +++++++++++----- > hw/xilinx_uartlite.c | 11 +++++++++-- > monitor.c | 18 ++++++++++++++---- > net/slirp.c | 8 ++++++-- > qemu-char.c | 32 ++++++++++++++++++++++---------- > qemu-char.h | 12 ++++++++---- > usb-redir.c | 9 +++++++-- > 27 files changed, 225 insertions(+), 82 deletions(-) It's not a win in terms of code size. If you plan on introducing additional handlers, perhaps you should include this in that series where it's more appropriately justified. As a change on it's own, it doesn't seem to make a lot of sense. Regards, Anthony Liguori