From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 2/6] libxc/save: Adjust stream-position callbacks for checkpointed streams Date: Wed, 13 May 2015 11:23:10 +0100 Message-ID: <5553260E.6030508@citrix.com> References: <1431423351-27424-1-git-send-email-andrew.cooper3@citrix.com> <1431423351-27424-3-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Wei Liu , Yang Hongyang , Ian Jackson , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org On 13/05/15 11:09, George Dunlap wrote: > On Tue, May 12, 2015 at 10:35 AM, Andrew Cooper > wrote: >> diff --git a/tools/libxc/xc_sr_save_x86_hvm.c b/tools/libxc/xc_sr_save_x86_hvm.c >> index 58efdb9..f4604db 100644 >> --- a/tools/libxc/xc_sr_save_x86_hvm.c >> +++ b/tools/libxc/xc_sr_save_x86_hvm.c >> @@ -184,7 +184,13 @@ static int x86_hvm_start_of_stream(struct xc_sr_context *ctx) >> return 0; >> } >> >> -static int x86_hvm_end_of_stream(struct xc_sr_context *ctx) >> +static int x86_hvm_start_of_checkpoint(struct xc_sr_context *ctx) >> +{ >> + /* no-op */ >> + return 0; >> +} >> + >> +static int x86_hvm_end_of_checkpoint(struct xc_sr_context *ctx) >> { >> int rc; >> >> @@ -209,7 +215,7 @@ static int x86_hvm_end_of_stream(struct xc_sr_context *ctx) >> if ( rc ) >> return rc; >> >> - return rc; >> + return 0; >> } > Nit: It looks like this boils down to: > > if ( rc != 0 ) return rc; else return 0; > > Why not just return rc and be done with it? > > (Just skimming through, no other comments ATM) Cleaner when adding new hunks in, which other patches do. ~Andrew