lkml.org 
[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] carl9170: Use the bitmap API when applicable
From
On 01/12/2021 23:05, Christophe JAILLET wrote:
> Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some
> open-coded arithmetic in allocator arguments.
>
> Note, that this 'bitmap_zalloc()' divides by BITS_PER_LONG the amount of
> memory allocated.
> The 'roundup()' used to computed the number of needed long should have
> been a DIV_ROUND_UP.
>
>
> Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
> consistency.
>
> Use 'bitmap_zero()' to avoid hand writing it.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Christian Lamparter <chunkeey@gmail.com>

\
 
 \ /
  Last update: 2021-12-03 08:58    [W:0.068 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site