lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/3] lib: bitmap: introduce bitmap_print_to_buf
    On Wed, Jun 02, 2021 at 09:48:52PM +0800, Tian Tao wrote:
    > New API bitmap_print_to_buf() with bin_attribute to avoid maskp
    > exceeding PAGE_SIZE. bitmap_print_to_pagebuf() is a special case
    > of bitmap_print_to_buf(), so in bitmap_print_to_pagebuf() call
    > bitmap_print_to_buf().

    ...

    > + * The role of cpumap_print_to_buf and cpumap_print_to_pagebuf is

    * The role of cpumap_print_to_buf() and cpumap_print_to_pagebuf() is

    ...

    > + * The role of bitmap_print_to_buf and bitmap_print_to_pagebuf() is

    * The role of bitmap_print_to_buf() and bitmap_print_to_pagebuf() is

    ...

    > + int size;

    Strictly speaking it should be ssize_t.

    > + void *data;
    > + const char *fmt = list ? "%*pbl\n" : "%*pb\n";

    Can you use reversed xmas tree order?

    ...

    > + return bitmap_print_to_buf(list, buf, maskp, nmaskbits,
    > + LLONG_MAX, len);

    It fits one line.

    --
    With Best Regards,
    Andy Shevchenko


    \
     
     \ /
      Last update: 2021-06-02 17:49    [W:4.511 / U:0.588 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site