From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
akpm@linux-foundation.org, jonathan.cameron@huawei.com,
song.bao.hua@hisilicon.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] lib: bitmap: introduce bitmap_print_to_buf
Date: Wed, 2 Jun 2021 18:47:27 +0300 [thread overview]
Message-ID: <YLeoDzObZpJwDswB@smile.fi.intel.com> (raw)
In-Reply-To: <1622641734-22538-2-git-send-email-tiantao6@hisilicon.com>
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
next prev parent reply other threads:[~2021-06-02 15:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 13:48 [PATCH v2 0/3] use bin_attribute to avoid buff overflow Tian Tao
2021-06-02 13:48 ` [PATCH v2 1/3] lib: bitmap: introduce bitmap_print_to_buf Tian Tao
2021-06-02 14:22 ` Jonathan Cameron
2021-06-02 15:47 ` Andy Shevchenko [this message]
2021-06-02 13:48 ` [PATCH v2 2/3] topology: use bin_attribute to avoid buff overflow Tian Tao
2021-06-02 15:48 ` Andy Shevchenko
2021-06-02 13:48 ` [PATCH v2 3/3] drivers/base/node.c: " Tian Tao
2021-06-02 15:50 ` Andy Shevchenko
2021-06-02 15:42 ` [PATCH v2 0/3] " Andy Shevchenko
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=YLeoDzObZpJwDswB@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=song.bao.hua@hisilicon.com \
--cc=tiantao6@hisilicon.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).