xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>
Cc: Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] sysctl: adjust XEN_SYSCTL_numainfo behavior
Date: Tue, 14 Jul 2015 14:17:55 +0100	[thread overview]
Message-ID: <55A528230200007800090B77@mail.emea.novell.com> (raw)
In-Reply-To: <55A503EA.2090804@citrix.com>

>>> On 14.07.15 at 14:43, <andrew.cooper3@citrix.com> wrote:
> 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 <boris.ostrovsky@oracle.com>
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>>
>> Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
>>
>> 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.

I don't see it requires this, and I can't even find it recommending
such - it just so happens that some people prefer using the extra
parentheses. I personally dislike them for all operators where the
precedence is "natural", i.e. here I wouldn't have added them if
I had written the code anew. Since I modified existing code, I
decided to retain previous style.

Jan

  reply	other threads:[~2015-07-14 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14  9:52 [PATCH] sysctl: adjust XEN_SYSCTL_numainfo behavior Jan Beulich
2015-07-14 12:35 ` Dario Faggioli
2015-07-14 12:43   ` Andrew Cooper
2015-07-14 13:17     ` Jan Beulich [this message]
2015-07-15 15:52 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55A528230200007800090B77@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dario.faggioli@citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).