I can't be too happy to know my first patch get accepted! ^_^
I hope I can make more contributions to community!


> -----Original Messages-----
> From: "Thomas Huth" <th...@redhat.com>
> Sent Time: 2018-02-26 14:49:46 (Monday)
> To: "Su Hang" <suhan...@mails.ucas.ac.cn>, boxa...@163.com
> Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefa...@redhat.com>
> Subject: Re: [Qemu-devel] [PATCH v4 RFC 3/3] util/uri.c: wrap single 
> statement blocks with braces {}
> 
> On 25.02.2018 05:35, Su Hang wrote:
> > For this patch, using curly braces to wrap `if` `while` `else` statements,
> > which only hold single statement. For example:
> > '''
> > if (cond)
> >     statement;
> > '''
> > to
> > '''
> > if (cond) {
> >     statement;
> > }
> > '''
> > 
> > And using tricks that compare the disassemblies before and after
> > code changes, to make sure code logic isn't changed:
> > '''
> > git checkout master
> > make util/uri.o
> > strip util/uri.o
> > objdump -Drx util/uri.o > /tmp/uri-master.txt
> > git checkout cleanupbranch
> > make util/uri.o
> > strip util/uri.o
> > objdump -Drx util/uri.o > /tmp/uri-cleanup.txt
> > diff -u /tmp/uri-*.txt
> > '''
> > 
> > With that, all complaints raised by checkpatch.pl have been suppressed.  
> > 
> > Suggested-by: Thomas Huth <th...@redhat.com>
> > Suggested-by: Eric Blake <ebl...@redhat.com>
> > Signed-off-by: Su Hang <suhan...@mails.ucas.ac.cn>
> > ---
> >  util/uri.c | 463 
> > +++++++++++++++++++++++++++++++++++++++----------------------
> >  1 file changed, 294 insertions(+), 169 deletions(-)
> 
> Reviewed-by: Thomas Huth <th...@redhat.com>
> 
> I've also checked again with the "objdump" trick that there are no
> differences in the generated code, and indeed, looks good now, so I
> think I can also say:
> 
> Tested-by: Thomas Huth <th...@redhat.com>
> 
> Thank you very much for cleaning up that huge file!
> 
>  Thomas

Reply via email to