|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [[PATCH v4]] new functions libxl_bitmap_{or,and}
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@xxxxxxxx>
>
> ---
>
[...]
> +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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |