From: George Dunlap <george.dunlap@eu.citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Dario Faggioli <dario.faggioli@citrix.com>,
"Tim (Xen.org)" <tim@xen.org>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] credit: track residual from divisions done during accounting
Date: Tue, 26 Feb 2013 12:54:13 +0000 [thread overview]
Message-ID: <512CB075.7050202@eu.citrix.com> (raw)
In-Reply-To: <1361881287.7099.0.camel@hastur.hellion.org.uk>
On 02/26/2013 12:21 PM, Ian Campbell wrote:
> On Tue, 2013-02-26 at 12:00 +0000, David Vrabel wrote:
>> On 26/02/13 11:52, Tim Deegan wrote:
>>> How about ASSERT(((typeof credits) val) == val) before the assignment?
>
> Why not just
> ASSERT(credits == val); /* Ensure we haven't truncated val */
I prefer this one to having "typeof credits" in the ASSERT. The main
thing is just to minimize the amount of effort a programmer has to
expend trying to figure out what's going on, so he can spend it on
something else. :-)
-George
next prev parent reply other threads:[~2013-02-26 12:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 12:37 [PATCH] credit: track residual from divisions done during accounting Jan Beulich
2013-02-22 17:26 ` Dario Faggioli
2013-02-25 9:29 ` Jan Beulich
2013-02-25 10:45 ` Dario Faggioli
2013-02-25 11:12 ` David Vrabel
2013-02-25 11:30 ` Jan Beulich
2013-02-26 11:26 ` George Dunlap
2013-02-26 11:46 ` Jan Beulich
2013-02-26 11:52 ` Tim Deegan
2013-02-26 12:00 ` David Vrabel
2013-02-26 12:21 ` Ian Campbell
2013-02-26 12:51 ` Jan Beulich
2013-02-26 13:10 ` Ian Campbell
2013-02-26 12:54 ` George Dunlap [this message]
2013-02-26 13:46 ` Tim Deegan
2013-02-26 15:00 ` George Dunlap
2013-02-26 15:07 ` Jan Beulich
2013-02-26 15:11 ` George Dunlap
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=512CB075.7050202@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=dario.faggioli@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.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 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.