From patchwork Sat Jun 4 08:14:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhao xiao qiang X-Patchwork-Id: 9154549 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 2E43960221 for ; Sat, 4 Jun 2016 08:21:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06B6927F3E for ; Sat, 4 Jun 2016 08:21:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DECFF2832B; Sat, 4 Jun 2016 08:21:46 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 6572627F3E for ; Sat, 4 Jun 2016 08:21:46 +0000 (UTC) Received: from localhost ([::1]:59882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96q0-0006s2-Rz for patchwork-qemu-devel@patchwork.kernel.org; Sat, 04 Jun 2016 04:21:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96jp-000190-Ue for qemu-devel@nongnu.org; Sat, 04 Jun 2016 04:15:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b96jf-00024W-8L for qemu-devel@nongnu.org; Sat, 04 Jun 2016 04:15:20 -0400 Received: from m12-18.163.com ([220.181.12.18]:59032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b96jd-00021Y-I6; Sat, 04 Jun 2016 04:15:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=9fTeQh7498XNdPk9Yu EjlnaeSk3FWuEPUJ5uTXb8iFs=; b=EnD7eHSUFP/cSRQrjST9oo5DxxaLvdo7jm noNrQLo0j703jFXCx20y33IGbw8+aobip9FlZ46IHV/eOHIqiCcVyOS9qF6xXMqZ +oG+ftuMioSyA1wLYLR8x1F0Is6ihZDs20D+oBHukZuUM/uPhBJ9LgLNl+MhkFdr kgh1cFd80= Received: from debian.lan (unknown [114.111.167.200]) by smtp14 (Coremail) with SMTP id EsCowECpfUbfjVJXKXU9AA--.28040S8; Sat, 04 Jun 2016 16:14:42 +0800 (CST) From: xiaoqiang zhao To: qemu-devel@nongnu.org Date: Sat, 4 Jun 2016 16:14:25 +0800 Message-Id: <1465028065-5855-7-git-send-email-zxq_yx_007@163.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1465028065-5855-1-git-send-email-zxq_yx_007@163.com> References: <1465028065-5855-1-git-send-email-zxq_yx_007@163.com> X-CM-TRANSID: EsCowECpfUbfjVJXKXU9AA--.28040S8 X-Coremail-Antispam: 1Uf129KBjvJXoW7KFy7ZrWUZFW7Ww48JFWDArb_yoW8Xr48pF 93Cr9rury5WrW5Xr17GF1fCF15Ww1UGr17W34kuw1vv3Z0vw18ursrta10yryDXrZ2qryY vF93ZFs0ya15taDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07b4jjkUUUUU= X-Originating-IP: [114.111.167.200] X-CM-SenderInfo: 520ts5t0bqili6rwjhhfrp/1tbiOxJ+xlXlT5XBVQAAsv X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.181.12.18 Subject: [Qemu-devel] [PATCH v2 6/6] 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: , Cc: robh@kernel.org, peter.maydell@linaro.org, crosthwaite.peter@gmail.com, armbru@redhat.com, alistair.francis@xilinx.com, qemu-arm@nongnu.org, antonynpavlov@gmail.com, pbonzini@redhat.com, edgar.iglesias@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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",