From patchwork Mon Jun 6 14:47:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 9158611 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 811EC60777 for ; Mon, 6 Jun 2016 15:35:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7331B28210 for ; Mon, 6 Jun 2016 15:35:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 675FA28327; Mon, 6 Jun 2016 15:35:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E73A32821F for ; Mon, 6 Jun 2016 15:35:35 +0000 (UTC) Received: from localhost ([::1]:43176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wYx-0007qL-19 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 06 Jun 2016 11:35:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9vow-00009W-95 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 10:48:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9vot-0000Xa-Gy for qemu-devel@nongnu.org; Mon, 06 Jun 2016 10:48:01 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:57508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9vot-0000WT-5b for qemu-devel@nongnu.org; Mon, 06 Jun 2016 10:47:59 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1b9vos-0008Hc-Lo for qemu-devel@nongnu.org; Mon, 06 Jun 2016 15:47:58 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 6 Jun 2016 15:47:43 +0100 Message-Id: <1465224465-21998-27-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465224465-21998-1-git-send-email-peter.maydell@linaro.org> References: <1465224465-21998-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 26/28] char: get rid of qemu_char_get_next_serial X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: xiaoqiang zhao since there is no user of qemu_char_get_next_serial any more, it's time to let it go away. Acked-by: Paolo Bonzini Signed-off-by: xiaoqiang zhao Message-id: 1465028065-5855-7-git-send-email-zxq_yx_007@163.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/sysemu/char.h | 1 - qemu-char.c | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 307fd8f..372a6fd 100644 --- a/include/sysemu/char.h +++ b/include/sysemu/char.h @@ -403,7 +403,6 @@ void register_char_driver(const char *name, ChardevBackendKind kind, extern int term_escape_char; -CharDriverState *qemu_char_get_next_serial(void); /* console.c */ typedef CharDriverState *(VcHandler)(ChardevVC *vc, Error **errp); diff --git a/qemu-char.c b/qemu-char.c index b597ee1..b13ecbb 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -4088,22 +4088,6 @@ CharDriverState *qemu_chr_find(const char *name) return NULL; } -/* Get a character (serial) device interface. */ -CharDriverState *qemu_char_get_next_serial(void) -{ - static int next_serial; - CharDriverState *chr; - - /* FIXME: This function needs to go away: use chardev properties! */ - - while (next_serial < MAX_SERIAL_PORTS && serial_hds[next_serial]) { - chr = serial_hds[next_serial++]; - qemu_chr_fe_claim_no_fail(chr); - return chr; - } - return NULL; -} - QemuOptsList qemu_chardev_opts = { .name = "chardev", .implied_opt_name = "backend",