From patchwork Wed May 25 10:58:16 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: 9135201 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 EA42060221 for ; Wed, 25 May 2016 11:31:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC32C28164 for ; Wed, 25 May 2016 11:31:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D112A282D4; Wed, 25 May 2016 11:31:19 +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 79B7028164 for ; Wed, 25 May 2016 11:31:19 +0000 (UTC) Received: from localhost ([::1]:59120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5X1x-0004G6-RJ for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 07:31:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5WWt-0000cR-6L for qemu-devel@nongnu.org; Wed, 25 May 2016 06:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5WWj-0002Nb-RA for qemu-devel@nongnu.org; Wed, 25 May 2016 06:59:10 -0400 Received: from m12-18.163.com ([220.181.12.18]:39500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5WWj-0002K4-7o; Wed, 25 May 2016 06:59:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=pA+nzu9PB+oZgeSdXO tLP/bY4ZddOeUWqiN+xDRTw8M=; b=AOuzKFHq3cZZovU9IMSUFrdhjfyPKzXpF2 u3ezwd9HRzhsSN6Jhiqk5PMbgezt9CaJUw0e4Crk6l9aZb5B9BAsJYrS9/WZKRTJ 072+7ebzTXhJhsu8BJMwTgyjpRS/cXvF4a8rF/I6EMYROcrfy1SCrmJUG6I7fvxz cxyx6NjYE= Received: from localhost.localdomain (unknown [118.187.28.42]) by smtp14 (Coremail) with SMTP id EsCowECZp0pKhUVXzcaKAA--.5553S8; Wed, 25 May 2016 18:58:52 +0800 (CST) From: xiaoqiang zhao To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 18:58:16 +0800 Message-Id: <1464173896-4088-7-git-send-email-zxq_yx_007@163.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1464173896-4088-1-git-send-email-zxq_yx_007@163.com> References: <1464173896-4088-1-git-send-email-zxq_yx_007@163.com> X-CM-TRANSID: EsCowECZp0pKhUVXzcaKAA--.5553S8 X-Coremail-Antispam: 1Uf129KBjvJXoW7uFyfCw4DGw4UZw4rZr4kXrb_yoW8GFykpr 9akr9rWry5Wry5Xr17GF13CF15Ww1UGr17W34kuwnYv3WYvw10grsrta10yryUXrZ2qryY vF93XFs0ya15taDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jkxhLUUUUU= X-Originating-IP: [118.187.28.42] X-CM-SenderInfo: 520ts5t0bqili6rwjhhfrp/xtbBEgx0xlZXx--fXwABsU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 220.181.12.18 Subject: [Qemu-devel] [PATCH 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, 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. Signed-off-by: xiaoqiang zhao Acked-by: Paolo Bonzini --- 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",