diff options
| author | Christophe JAILLET <[email protected]> | 2021-12-01 23:05:15 +0100 |
|---|---|---|
| committer | Kalle Valo <[email protected]> | 2021-12-08 10:35:56 +0200 |
| commit | 6273c97296a8e4936571bde5153bc0398fae087c (patch) | |
| tree | a2b4a5b2ddaa547661609a27e4a2403e5b168919 /tools/perf/scripts/python/powerpc-hcalls.py | |
| parent | 09cab4308bf9b8076ee4a3c56015daf9ef9cb23e (diff) | |
carl9170: Use the bitmap API when applicable
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 <[email protected]>
Acked-by: Christian Lamparter <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/1fe18fb73f71d855043c40c83865ad539f326478.1638396221.git.christophe.jaillet@wanadoo.fr
Diffstat (limited to 'tools/perf/scripts/python/powerpc-hcalls.py')
0 files changed, 0 insertions, 0 deletions