diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2006-01-12 18:43:58 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-12 18:43:58 -0500 |
commit | c063a06835d3ccfa6c039d3a3869fcf22249c862 (patch) | |
tree | a056b2ab3032a3efa12f07f1ee952b75066e822e /drivers/infiniband | |
parent | 17e2e819517d75f2f3407e59c5f7f6f0ef305d14 (diff) |
IB/mthca: Cosmetic: use the ALIGN macro
Use the ALIGN macro to simplify some rounding code.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index f69e4896eff0..be1791be627b 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -727,8 +727,8 @@ int mthca_QUERY_FW(struct mthca_dev *dev, u8 *status) | |||
727 | * system pages needed. | 727 | * system pages needed. |
728 | */ | 728 | */ |
729 | dev->fw.arbel.fw_pages = | 729 | dev->fw.arbel.fw_pages = |
730 | (dev->fw.arbel.fw_pages + (1 << (PAGE_SHIFT - 12)) - 1) >> | 730 | ALIGN(dev->fw.arbel.fw_pages, PAGE_SIZE >> 12) >> |
731 | (PAGE_SHIFT - 12); | 731 | (PAGE_SHIFT - 12); |
732 | 732 | ||
733 | mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n", | 733 | mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n", |
734 | (unsigned long long) dev->fw.arbel.clr_int_base, | 734 | (unsigned long long) dev->fw.arbel.clr_int_base, |
@@ -1445,6 +1445,7 @@ int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages, | |||
1445 | * pages needed. | 1445 | * pages needed. |
1446 | */ | 1446 | */ |
1447 | *aux_pages = (*aux_pages + (1 << (PAGE_SHIFT - 12)) - 1) >> (PAGE_SHIFT - 12); | 1447 | *aux_pages = (*aux_pages + (1 << (PAGE_SHIFT - 12)) - 1) >> (PAGE_SHIFT - 12); |
1448 | *aux_pages = ALIGN(*aux_pages, PAGE_SIZE >> 12) >> (PAGE_SHIFT - 12); | ||
1448 | 1449 | ||
1449 | return 0; | 1450 | return 0; |
1450 | } | 1451 | } |