Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/cio: rename bitmap_size() -> idset_bitmap_size()

bitmap_size() is a pretty generic name and one may want to use it for
a generic bitmap API function. At the same time, its logic is not
"generic", i.e. it's not just `nbits -> size of bitmap in bytes`
converter as it would be expected from its name.
Add the prefix 'idset_' used throughout the file where the function
resides.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Acked-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexander Lobakin and committed by
David S. Miller
c1023f56 8fab6a9d

+6 -4
+6 -4
drivers/s390/cio/idset.c
··· 16 16 unsigned long bitmap[]; 17 17 }; 18 18 19 - static inline unsigned long bitmap_size(int num_ssid, int num_id) 19 + static inline unsigned long idset_bitmap_size(int num_ssid, int num_id) 20 20 { 21 21 return BITS_TO_LONGS(num_ssid * num_id) * sizeof(unsigned long); 22 22 } ··· 25 25 { 26 26 struct idset *set; 27 27 28 - set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id)); 28 + set = vmalloc(sizeof(struct idset) + 29 + idset_bitmap_size(num_ssid, num_id)); 29 30 if (set) { 30 31 set->num_ssid = num_ssid; 31 32 set->num_id = num_id; 32 - memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); 33 + memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id)); 33 34 } 34 35 return set; 35 36 } ··· 42 41 43 42 void idset_fill(struct idset *set) 44 43 { 45 - memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); 44 + memset(set->bitmap, 0xff, 45 + idset_bitmap_size(set->num_ssid, set->num_id)); 46 46 } 47 47 48 48 static inline void idset_add(struct idset *set, int ssid, int id)