@@ -21,6 +21,7 @@
* included with this package. *
*******************************************************************/
+#include <linux/bitmap.h>
#include <linux/mempool.h>
#include <linux/slab.h>
#include <linux/pci.h>
@@ -78,8 +79,7 @@ lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) {
if (max_xri <= 0)
return -ENOMEM;
- bytes = ((BITS_PER_LONG - 1 + max_xri) / BITS_PER_LONG) *
- sizeof(unsigned long);
+ bytes = bitmap_size(max_xri);
phba->cfg_rrq_xri_bitmap_sz = bytes;
phba->active_rrq_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE,
bytes);
Use bitmap_size() instead of hand-writing it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/scsi/lpfc/lpfc_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)