From patchwork Thu Jan 7 19:56:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 564419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 53E651402BC for ; Fri, 8 Jan 2016 06:59:54 +1100 (AEDT) Received: from localhost ([::1]:60714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGis-00028r-SB for incoming@patchwork.ozlabs.org; Thu, 07 Jan 2016 14:59:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGfV-000428-SX for qemu-devel@nongnu.org; Thu, 07 Jan 2016 14:56:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHGfT-0005nS-By for qemu-devel@nongnu.org; Thu, 07 Jan 2016 14:56:21 -0500 Received: from smtp.citrix.com ([66.165.176.89]:63817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHGfT-0005mi-7G for qemu-devel@nongnu.org; Thu, 07 Jan 2016 14:56:19 -0500 X-IronPort-AV: E=Sophos;i="5.20,534,1444694400"; d="scan'208";a="323539131" From: Wei Liu To: Date: Thu, 7 Jan 2016 19:56:06 +0000 Message-ID: <1452196584-17259-10-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452196584-17259-1-git-send-email-wei.liu2@citrix.com> References: <1452196584-17259-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Cc: Greg Kurz , Wei Liu , "Aneesh Kumar K.V" , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH v2 09/27] 9pfs: remove dead code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some structures virtio-9p.h have been unused since 2011 when relevant functions switched to use coroutines. The declaration of pdu_packunpack and function do_pdu_unpack are useless. Signed-off-by: Wei Liu --- v2: don't delete set_fd_limit function --- hw/9pfs/virtio-9p.h | 68 ----------------------------------------------------- 1 file changed, 68 deletions(-) diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index ac4cb00..3c78d3c 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -227,65 +227,6 @@ typedef struct V9fsState V9fsConf fsconf; } V9fsState; -typedef struct V9fsStatState { - V9fsPDU *pdu; - size_t offset; - V9fsStat v9stat; - V9fsFidState *fidp; - struct stat stbuf; -} V9fsStatState; - -typedef struct V9fsOpenState { - V9fsPDU *pdu; - size_t offset; - int32_t mode; - V9fsFidState *fidp; - V9fsQID qid; - struct stat stbuf; - int iounit; -} V9fsOpenState; - -typedef struct V9fsReadState { - V9fsPDU *pdu; - size_t offset; - int32_t count; - int32_t total; - int64_t off; - V9fsFidState *fidp; - struct iovec iov[128]; /* FIXME: bad, bad, bad */ - struct iovec *sg; - off_t dir_pos; - struct dirent *dent; - struct stat stbuf; - V9fsString name; - V9fsStat v9stat; - int32_t len; - int32_t cnt; - int32_t max_count; -} V9fsReadState; - -typedef struct V9fsWriteState { - V9fsPDU *pdu; - size_t offset; - int32_t len; - int32_t count; - int32_t total; - int64_t off; - V9fsFidState *fidp; - struct iovec iov[128]; /* FIXME: bad, bad, bad */ - struct iovec *sg; - int cnt; -} V9fsWriteState; - -typedef struct V9fsMkState { - V9fsPDU *pdu; - size_t offset; - V9fsQID qid; - struct stat stbuf; - V9fsString name; - V9fsString fullname; -} V9fsMkState; - /* 9p2000.L open flags */ #define P9_DOTL_RDONLY 00000000 #define P9_DOTL_WRONLY 00000001 @@ -345,15 +286,6 @@ typedef struct V9fsGetlock extern int open_fd_hw; extern int total_open_fd; -size_t pdu_packunpack(void *addr, struct iovec *sg, int sg_count, - size_t offset, size_t size, int pack); - -static inline size_t do_pdu_unpack(void *dst, struct iovec *sg, int sg_count, - size_t offset, size_t size) -{ - return pdu_packunpack(dst, sg, sg_count, offset, size, 0); -} - static inline void v9fs_path_write_lock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) {