>>> On 27.03.17 at 17:16, <wei.l...@citrix.com> wrote: > On Fri, Mar 24, 2017 at 01:04:56PM -0400, Boris Ostrovsky wrote: >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -924,11 +924,61 @@ static int reserve_offlined_page(struct page_info >> *head) >> return count; >> } >> >> +static bool_t can_merge(struct page_info *buddy, unsigned int node, > > Plain bool please. > >> + unsigned int order) >> +{ >> + if ( !mfn_valid(_mfn(page_to_mfn(buddy))) || >> + !page_state_is(buddy, free) || >> + (PFN_ORDER(buddy) != order) || >> + (phys_to_nid(page_to_maddr(buddy)) != node) ) >> + return 0; >> + >> + return 1; > > True and false.
Actually there's no point in having two return statements here in the first place the value of the expression (suitably inverted) can be the operand of return. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel