From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv0xN-0007w3-M0 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 02:29:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv0xM-0000G2-JN for qemu-devel@nongnu.org; Tue, 15 Jan 2013 02:29:13 -0500 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:58767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv0xL-0000Fj-Tz for qemu-devel@nongnu.org; Tue, 15 Jan 2013 02:29:12 -0500 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Jan 2013 12:58:01 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 10ABD125804C for ; Tue, 15 Jan 2013 12:59:24 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0F7T4oJ56164408 for ; Tue, 15 Jan 2013 12:59:04 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0F7T4mn004452 for ; Tue, 15 Jan 2013 18:29:04 +1100 Message-ID: <50F504CF.4020607@linux.vnet.ibm.com> Date: Tue, 15 Jan 2013 15:27:11 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1358147387-8221-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1358147387-8221-2-git-send-email-xiawenc@linux.vnet.ibm.com> <20130114150811.63fe1455@doriath.home> In-Reply-To: <20130114150811.63fe1455@doriath.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V3 01/11] qemu-img: remove unused parameter in collect_image_info() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, phrdina@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com 于 2013-1-15 1:08, Luiz Capitulino 写道: > On Mon, 14 Jan 2013 15:09:37 +0800 > Wenchao Xia wrote: > >> Parameter *fmt was not used, so remove it. >> >> Reviewed-by: Eric Blake >> Signed-off-by: Wenchao Xia >> --- >> qemu-img.c | 5 ++--- >> 1 files changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/qemu-img.c b/qemu-img.c >> index 85d3740..9dab48f 100644 >> --- a/qemu-img.c >> +++ b/qemu-img.c >> @@ -1186,8 +1186,7 @@ static void dump_json_image_info(ImageInfo *info) >> >> static void collect_image_info(BlockDriverState *bs, >> ImageInfo *info, >> - const char *filename, >> - const char *fmt) >> + const char *filename) > > collect_image_info_list() doc reads: > > @fmt: topmost image format (may be NULL to autodetect) > > However, right now only fmt=NULL is supported, as collect_image_info() > ignores fmt altogether. > > So, if this patch is correct we better update the comment. Otherwise, > we should improve collect_image_info() to actually obey fmt != NULL. > @fmt was ignored in the function and I can't see a reason to have it while *bs contains the info, will change the comments. >> { >> uint64_t total_sectors; >> char backing_filename[1024]; >> @@ -1361,7 +1360,7 @@ static ImageInfoList *collect_image_info_list(const char *filename, >> } >> >> info = g_new0(ImageInfo, 1); >> - collect_image_info(bs, info, filename, fmt); >> + collect_image_info(bs, info, filename); >> collect_snapshots(bs, info); >> >> elem = g_new0(ImageInfoList, 1); > -- Best Regards Wenchao Xia