From patchwork Mon Jul 30 02:46:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)\" via" X-Patchwork-Id: 10548395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7965F112E for ; Mon, 30 Jul 2018 02:48:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 694F32997E for ; Mon, 30 Jul 2018 02:48:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D7DE29985; Mon, 30 Jul 2018 02:48:54 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,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 BDDF72997E for ; Mon, 30 Jul 2018 02:48:53 +0000 (UTC) Received: from localhost ([::1]:50308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjyEs-0005Vf-Qz for patchwork-qemu-devel@patchwork.kernel.org; Sun, 29 Jul 2018 22:48:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjyDq-0004IT-OT for qemu-devel@nongnu.org; Sun, 29 Jul 2018 22:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjyDq-0001eb-4a for qemu-devel@nongnu.org; Sun, 29 Jul 2018 22:47:46 -0400 Received: from synology.com ([59.124.61.242]:41155) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fjyDk-0001Yb-Nv; Sun, 29 Jul 2018 22:47:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1532918847; bh=08JLSMcWpn7oYfcpoi3OeBHvA2Mg1VIwpDpbETzr5h8=; h=From:To:Cc:Subject:Date; b=gnZX/+o6GSALrp+Bj9bcscYJhzUfw1s3AeBPNpEGS4lniHUr76vs7SV9dfyoy1H3g QZ28BxuFDAkqebYxyp63/urEMR712Mstj9JCwCw3/Eqk8U9m7Uqw0BxU+XbwzD/NFR dQFBBf/rvvVHLeNWEK9nc0RRas47TTFBwVHksvc0= To: qemu-devel@nongnu.org Date: Mon, 30 Jul 2018 10:46:59 +0800 Message-Id: <20180730024701.7613-1-yuchenlin@synology.com> X-Synology-MCP-Status: no X-Synology-Spam-Flag: no X-Synology-Spam-Status: score=0, required 5, WHITELIST_FROM_ADDRESS 0 X-Synology-Virus-Status: no X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 59.124.61.242 Subject: [Qemu-devel] [PATCH 0/2] Refine some vdi code 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: , X-Patchwork-Original-From: yuchenlin--- via Qemu-devel From: "Zhijian Li (Fujitsu)\" via" Reply-To: yuchenlin@synology.com Cc: sw@weilnetz.de, yuchenlin , qemu-block@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: yuchenlin This series refine some code in vdi.c, includes: * Remvoe CONFIG_VDI_WRITE because there is no reason to leave an always on and cannot configure option in the code-side. * decouple if else if chain to get more readability. Thanks, yuchenlin yuchenlin (2): vdi: remove CONFIG_VDI_WRITE vdi: refine code for vdi_open block/vdi.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-)