diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:18:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:18:44 -0500 |
commit | 5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f (patch) | |
tree | cb2d487774571ec608bcf4241ec70fc19a0b3ad6 /drivers/infiniband/hw/mthca/mthca_eq.c | |
parent | 64ca9004b819ab87648dbfc78f3ef49ee491343e (diff) | |
parent | 4f8448dfe8d3804fadad90c9b77494238b4a4eae (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_eq.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_eq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index 34d68e5a72d8..e8a948f087c0 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c | |||
@@ -484,8 +484,7 @@ static int __devinit mthca_create_eq(struct mthca_dev *dev, | |||
484 | u8 intr, | 484 | u8 intr, |
485 | struct mthca_eq *eq) | 485 | struct mthca_eq *eq) |
486 | { | 486 | { |
487 | int npages = (nent * MTHCA_EQ_ENTRY_SIZE + PAGE_SIZE - 1) / | 487 | int npages; |
488 | PAGE_SIZE; | ||
489 | u64 *dma_list = NULL; | 488 | u64 *dma_list = NULL; |
490 | dma_addr_t t; | 489 | dma_addr_t t; |
491 | struct mthca_mailbox *mailbox; | 490 | struct mthca_mailbox *mailbox; |
@@ -496,6 +495,7 @@ static int __devinit mthca_create_eq(struct mthca_dev *dev, | |||
496 | 495 | ||
497 | eq->dev = dev; | 496 | eq->dev = dev; |
498 | eq->nent = roundup_pow_of_two(max(nent, 2)); | 497 | eq->nent = roundup_pow_of_two(max(nent, 2)); |
498 | npages = ALIGN(eq->nent * MTHCA_EQ_ENTRY_SIZE, PAGE_SIZE) / PAGE_SIZE; | ||
499 | 499 | ||
500 | eq->page_list = kmalloc(npages * sizeof *eq->page_list, | 500 | eq->page_list = kmalloc(npages * sizeof *eq->page_list, |
501 | GFP_KERNEL); | 501 | GFP_KERNEL); |