]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/cpqarray.c
drivers/block: Use DIV_ROUND_UP
[linux-2.6-omap-h63xx.git] / drivers / block / cpqarray.c
index 09c14341e6e39582c4230d71ec8bddb384e26610..3d967525e9a96f0bfafcb7aa1d95a9e9e42b4fc8 100644 (file)
@@ -424,7 +424,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev)
                hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t),
                &(hba[i]->cmd_pool_dhandle));
        hba[i]->cmd_pool_bits = kcalloc(
-               (NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG, sizeof(unsigned long),
+               DIV_ROUND_UP(NR_CMDS, BITS_PER_LONG), sizeof(unsigned long),
                GFP_KERNEL);
 
        if (!hba[i]->cmd_pool_bits || !hba[i]->cmd_pool)