From: Linda <lindaj@jma3.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
lars.kurth.xen@gmail.com, xen-devel@lists.xen.org,
julien.grall@citrix.com, ian.jackson@citrix.com
Subject: Re: [[PATCH v4]] new functions libxl_bitmap_{or,and}
Date: Wed, 15 Apr 2015 05:07:44 -0600 [thread overview]
Message-ID: <552E4680.9010905@jma3.com> (raw)
In-Reply-To: <20150414163307.GA8128@zion.uk.xensource.com>
Not ignored. Sorry. I shouldn't have read from my iPhone. I didn't
see the others. I'll take care of them.
Linda
On 4/14/2015 10:33 AM, Wei Liu wrote:
> Urgh... I think I made a mistake in the rune I gave you, sorry. The
> --subject-prefix= doesn't need to include "[]".
>
> And you forgot to change the subject line to
> libxl: provide libxl_bitmap_{and,or}
>
> I'm a picky about the subject line because this is what shows up when
> you look at git commit log.
>
> On Tue, Apr 14, 2015 at 08:07:59AM -0600, Linda Jacobson wrote:
>> provide logical and and or of two bitmaps
> Provide logical and and or of two bitmaps.
>
> This should be a proper sentence.
>
> Other than these minor nits the code logic looks OK.
>
>> Signed-off-by: Linda Jacobson <lindaj@jma3.com>
>>
>> ---
>>
> [...]
>> +int libxl_bitmap_and(libxl_ctx *ctx, libxl_bitmap *and_map,
>> + const libxl_bitmap *map1, const libxl_bitmap *map2)
>> +{
>> + GC_INIT(ctx);
>> + int rc;
>> + uint32_t i;
>> + const libxl_bitmap *large_map;
>> + const libxl_bitmap *small_map;
>> +
>> + if (map1->size > map2->size) {
>> + large_map = map1;
>> + small_map = map2;
>> + } else {
>> + large_map = map2;
>> + small_map = map1;
>> + }
>> +
>> +
> We only need one blank line here.
>
>> + rc = libxl_bitmap_alloc(ctx, and_map, small_map->size * 8);
>> + if (rc)
>> + goto out;
>> +
>> + /*
>> + * If bitmaps aren't same size, their 'and' will be size of
>> + * smaller bit map
>> + */
>> + for (i = 0; i < and_map->size; i++)
>> + and_map->map[i] = (large_map->map[i] & small_map->map[i]);
>> +
>> +out:
>> + GC_FREE;
>> + return rc;
>> +
> No need to have blank lines after "return rc;"
>
> Wei.
>
prev parent reply other threads:[~2015-04-15 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-14 14:07 [[PATCH v4]] new functions libxl_bitmap_{or,and} Linda Jacobson
2015-04-14 16:33 ` Wei Liu
2015-04-14 16:48 ` Linda Jacobson
2015-04-15 11:07 ` Linda [this message]
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=552E4680.9010905@jma3.com \
--to=lindaj@jma3.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=julien.grall@citrix.com \
--cc=lars.kurth.xen@gmail.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--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.