From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] sysctl: adjust XEN_SYSCTL_numainfo behavior Date: Tue, 14 Jul 2015 13:43:22 +0100 Message-ID: <55A503EA.2090804@citrix.com> References: <55A4F7F002000078000908B4@mail.emea.novell.com> <1436877325.13522.87.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZEzYW-0007WF-Ha for xen-devel@lists.xenproject.org; Tue, 14 Jul 2015 12:43:28 +0000 In-Reply-To: <1436877325.13522.87.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli , Jan Beulich Cc: Keir Fraser , Ian Jackson , Tim Deegan , Ian Campbell , xen-devel , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 14/07/15 13:35, Dario Faggioli wrote: > On Tue, 2015-07-14 at 10:52 +0100, Jan Beulich wrote: >> ... to match XEN_SYSCTL_cputopoinfo, allowing the caller to get what it >> needs (if e.g. it's after the data for just one specific node) with >> just one hypercall, without caring about the total number of nodes in >> the system. >> >> Suggested-by: Boris Ostrovsky >> Signed-off-by: Jan Beulich >> > Reviewed-by: Dario Faggioli > > One question: > >> --- a/xen/common/sysctl.c >> +++ b/xen/common/sysctl.c >> >> @@ -335,7 +329,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xe >> else >> i = num_nodes; >> >> - if ( (!ret || (ret == -ENOBUFS)) && (ni->num_nodes != i) ) >> + if ( !ret && (ni->num_nodes != i) ) >> { > Can't we kill the parentheses around the second argument of the && ? No. The coding style requires binary operators as part of larger statements to have brackets. ~Andrew