From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqwTW-0000De-O5 for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:58:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VqwTN-00075N-FS for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:58:06 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:55559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VqwTM-00070K-Nw for qemu-devel@nongnu.org; Wed, 11 Dec 2013 21:57:57 -0500 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Dec 2013 12:57:53 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id CA9CC2CE802D for ; Thu, 12 Dec 2013 13:57:50 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBC2da779109930 for ; Thu, 12 Dec 2013 13:39:37 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBC2vnEu003523 for ; Thu, 12 Dec 2013 13:57:49 +1100 Message-ID: <52A9262D.7070406@linux.vnet.ibm.com> Date: Thu, 12 Dec 2013 10:57:49 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1386796109-15264-1-git-send-email-kwolf@redhat.com> <1386796109-15264-2-git-send-email-kwolf@redhat.com> <52A92570.6030303@linux.vnet.ibm.com> In-Reply-To: <52A92570.6030303@linux.vnet.ibm.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/22] block: Move initialisation of BlockLimits to bdrv_refresh_limits() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, pl@kamp.de, stefanha@redhat.com >> +static int bdrv_refresh_limits(BlockDriverState *bs) >> +{ >> + BlockDriver *drv = bs->drv; >> + >> + memset(&bs->bl, 0, sizeof(bs->bl)); >> + >> + if (!drv) { >> + return 0; >> + } else if (drv->bdrv_refresh_limits) { >> + return drv->bdrv_refresh_limits(bs); >> + } >> + >> + return 0; > It seems this line can be removed. > I missed the "else if", then the patch is OK.