From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com,
vneethv@linux.ibm.com, oberpar@linux.ibm.com, hca@linux.ibm.com,
gor@linux.ibm.com, agordeev@linux.ibm.com,
borntraeger@linux.ibm.com, svens@linux.ibm.com,
almaz.alexandrovich@paragon-software.com, yury.norov@gmail.com,
linux@rasmusvillemoes.dk, linux-s390@vger.kernel.org,
ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size()
Date: Sat, 2 Jul 2022 21:42:02 +0200 [thread overview]
Message-ID: <62d3cfcd-a32e-59d1-c376-c95e8da1049f@wanadoo.fr> (raw)
In-Reply-To: <YsCdSkzSbVz9gnci@smile.fi.intel.com>
Le 02/07/2022 à 21:32, Andy Shevchenko a écrit :
> On Sat, Jul 02, 2022 at 09:24:24PM +0200, Christophe JAILLET wrote:
>> Le 02/07/2022 à 20:54, Andy Shevchenko a écrit :
>>> On Sat, Jul 02, 2022 at 08:29:09PM +0200, Christophe JAILLET wrote:
>
> ...
>
>>>> - memset(set->bitmap, 0, bitmap_size(num_ssid, num_id));
>>>> + memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id));
>>>
>>> Why not to use bitmap_zero()?
>
> ...
>
>>>> - memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id));
>>>> + memset(set->bitmap, 0xff, idset_bitmap_size(set->num_ssid, set->num_id));
>>>
>>> Why not to use bitmap_fill() ?
>
>> For this initial step, I wanted to keep changes as minimal as possible (i.e
>> just function renaming)
>>
>> In fact, I plan to send a follow-up patch on this file.
>> This would remove the newly renamed idset_bitmap_size() function, use the
>> bitmap API directly (as you pointed-out) with
>> "set->num_ssid * set->num_id" as size.
>>
>> It is already done this way in idset_is_empty(), so it would be more
>> consistent.
>>
>> If the serie needs a v2 (or if required), I can add an additional 5th patch
>> for it. Otherwise it will send separatly later.
>
> If you use bitmap APIs as I suggested above as the first patch, the rest will
> have less unneeded churn, no?
>
>
Makes sense.
I'll wait for some other potential comments 1 day or 2 and send a v2
with the simplification you propose as an initial step.
Thanks for your feed-back.
CJ
next prev parent reply other threads:[~2022-07-02 19:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-02 18:28 [PATCH 0/4] Introduce bitmap_size() Christophe JAILLET
2022-07-02 18:29 ` [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size() Christophe JAILLET
2022-07-02 18:54 ` Andy Shevchenko
2022-07-02 19:24 ` Christophe JAILLET
2022-07-02 19:32 ` Andy Shevchenko
2022-07-02 19:42 ` Christophe JAILLET [this message]
2022-07-02 20:46 ` Yury Norov
2022-07-04 4:28 ` Vineeth Vijayan
2022-07-02 18:29 ` [PATCH 2/4] fs/ntfs3: Rename bitmap_size() as ntfs3_bitmap_size() Christophe JAILLET
2022-07-02 18:58 ` Andy Shevchenko
2022-07-02 19:37 ` Christophe JAILLET
2022-07-02 20:57 ` Yury Norov
2022-07-02 18:29 ` [PATCH 3/4] bitmap: Introduce bitmap_size() Christophe JAILLET
2022-07-02 18:59 ` Andy Shevchenko
2022-07-02 21:09 ` Yury Norov
2022-07-03 6:50 ` Christophe JAILLET
2022-07-03 15:20 ` Andy Shevchenko
2022-07-03 19:13 ` Yury Norov
2022-07-03 20:41 ` Christophe JAILLET
2022-07-02 18:29 ` [PATCH 4/4] bitmap: Use bitmap_size() Christophe JAILLET
2022-07-02 20:44 ` [PATCH 0/4] Introduce bitmap_size() Yury Norov
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=62d3cfcd-a32e-59d1-c376-c95e8da1049f@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=agk@redhat.com \
--cc=agordeev@linux.ibm.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=borntraeger@linux.ibm.com \
--cc=dm-devel@redhat.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=ntfs3@lists.linux.dev \
--cc=oberpar@linux.ibm.com \
--cc=snitzer@kernel.org \
--cc=svens@linux.ibm.com \
--cc=vneethv@linux.ibm.com \
--cc=yury.norov@gmail.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).