RDMA/cxgb4: Use bitmap_zalloc() when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 24 Nov 2021 21:40:24 +0000 (22:40 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 25 Nov 2021 17:29:06 +0000 (13:29 -0400)
commitd4fdc383c023efcdc88bcb9a30ea982e036758c1
tree7b1501bd8507559c99853c5406a1e369d9705d0a
parent675e2694fc6c99effd6f07df296b1d806e49ec88
RDMA/cxgb4: Use bitmap_zalloc() when applicable

Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid
some open-coded arithmetic in allocator arguments.

Using the 'zalloc' version of the allocator also saves a now useless
'bitmap_zero()' call.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

While at it, remove an extra space in a statement just a few lines above.

Link: https://lore.kernel.org/r/e396c4aa16cd8945d43877570a8f6d926cea555a.1637789139.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/cxgb4/id_table.c