On 03/06/2013 11:07 PM, Wenchao Xia wrote: > This patch is just for making review easier, those two functions will > be modified and renamed later. > > Signed-off-by: Wenchao Xia <xiaw...@linux.vnet.ibm.com> > ---
> + > +void bdrv_collect_image_info(BlockDriverState *bs, > + ImageInfo *info, > + const char *fmt) > +{ Three arguments here... > + > +void bdrv_collect_snapshots(BlockDriverState *bs , ImageInfo *info); > +void bdrv_collect_image_info(BlockDriverState *bs, > + ImageInfo *info, > + const char *filename, > + const char *fmt); ...but four here... > > -static void collect_image_info(BlockDriverState *bs, > - ImageInfo *info, > - const char *filename) ...and moved from three arguments here... > info = g_new0(ImageInfo, 1); > - collect_image_info(bs, info, filename); > - collect_snapshots(bs, info); > + bdrv_collect_image_info(bs, info, filename, fmt); ...and your call site changes from 3 to 4 arguments. How did you compile this? Code motion must NOT make any semantic changes - you should have exactly three arguments, preferably with the same name, and save the addition of a fourth fmt argument until a later patch. Hint - a code motion patch should be easy to inspect with: $ diff -u <(sed -n 's/^-//p' patch) <(sed -n 's/^\+//p' patch) It's okay to have differences (such as 'static void collect_image_info' becoming exported 'void bdrv_collect_image_info', and to see reindentation to line up to the new function name), but the differences should be trivially correct, and not a change between number of parameters. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature