From: Balbir Singh <balbir@in.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, Thomas Graf <tgraf@suug.ch>,
Shailabh Nagar <nagar@watson.ibm.com>, Jay Lan <jlan@sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] taskstats: factor out reply assembling
Date: Thu, 02 Nov 2006 19:14:19 +0530 [thread overview]
Message-ID: <4549F633.9010902@in.ibm.com> (raw)
In-Reply-To: <20061102132252.GB3387@oleg>
Oleg Nesterov wrote:
> On 11/02, Balbir Singh wrote:
>> Oleg Nesterov wrote:
>>> +
>>> + aggr = TASKSTATS_TYPE_AGGR_TGID;
>>> + if (type == TASKSTATS_TYPE_PID)
>>> + aggr = TASKSTATS_TYPE_AGGR_PID;
>> How about using
>>
>> aggr = (type == TASKSTATS_TYPE_PID) ? TASKSTATS_TYPE_AGGR_PID :
>> TASKSTATS_TYPE_AGGR_TGID;
>
> I personally think this is much better. In fact, i did exactly same, but
> then changed it because (I think) CodingStyle police doesn't like '?:'.
>
> Or it does?
>
> Oleg.
>
There is an issue with double assignment if the type is TASKSTATS_TYPE_PID most
of the time. I see the '?' operator in several places in the code.
--
Balbir Singh,
Linux Technology Center,
IBM Software Labs
next prev parent reply other threads:[~2006-11-02 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 18:26 [PATCH 1/2] taskstats: factor out reply assembling Oleg Nesterov
2006-11-01 20:31 ` Shailabh Nagar
2006-11-02 5:13 ` Balbir Singh
2006-11-02 13:22 ` Oleg Nesterov
2006-11-02 13:44 ` Balbir Singh [this message]
2006-11-02 10:34 ` Thomas Graf
2006-11-02 12:37 ` Shailabh Nagar
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=4549F633.9010902@in.ibm.com \
--to=balbir@in.ibm.com \
--cc=akpm@osdl.org \
--cc=jlan@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nagar@watson.ibm.com \
--cc=oleg@tv-sign.ru \
--cc=tgraf@suug.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.