lkml.org 
[lkml]   [2022]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/4] s390/cio: Rename bitmap_size() as idset_bitmap_size()
From
Le 02/07/2022 à 20:54, Andy Shevchenko a écrit :
> On Sat, Jul 02, 2022 at 08:29:09PM +0200, Christophe JAILLET wrote:
>> In order to introduce a bitmap_size() function in the bitmap API, we have
>> to rename functions with a similar name.
>>
>> Add a "idset_" prefix and change bitmap_size() into idset_bitmap_size().
>>
>> No functional change.
>
> ...
>
>> - 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() ?
>
>

Hi,

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.

CJ

\
 
 \ /
  Last update: 2022-07-02 21:26    [W:0.600 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site