diff options
| author | Matt Turner <mattst88@gmail.com> | 2010-02-24 23:30:14 -0500 |
|---|---|---|
| committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:43 -0500 |
| commit | 2a5d66511a6adc0546a92d33734e3ebf7ab0d10c (patch) | |
| tree | e1793806f73d7c0cdc2619fe8a2e77ce40a04f1e | |
| parent | bba90760582d2563b28a4738fb785185a59e9e71 (diff) | |
MIPS: Use ALIGN(x, bytes) instead of __ALIGN_MASK(x, bytes - 1)
ALIGN(x, bytes) expands to __ALIGN_MASK(x, bytes - 1), so use the one
that is most clear.
Signed-off-by: Matt Turner <mattst88@gmail.com>
To: linux-mips@linux-mips.org
Cc: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/999/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| -rw-r--r-- | arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c index 25666da17b22..fdf5f19bfdb0 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c +++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c | |||
| @@ -253,7 +253,7 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t address_min, | |||
| 253 | * impossible requests up front. (NOP for address_min == 0) | 253 | * impossible requests up front. (NOP for address_min == 0) |
| 254 | */ | 254 | */ |
| 255 | if (alignment) | 255 | if (alignment) |
| 256 | address_min = __ALIGN_MASK(address_min, (alignment - 1)); | 256 | address_min = ALIGN(address_min, alignment); |
| 257 | 257 | ||
| 258 | /* | 258 | /* |
| 259 | * Reject inconsistent args. We have adjusted these, so this | 259 | * Reject inconsistent args. We have adjusted these, so this |
| @@ -291,7 +291,7 @@ int64_t cvmx_bootmem_phy_alloc(uint64_t req_size, uint64_t address_min, | |||
| 291 | * satisfy request. | 291 | * satisfy request. |
| 292 | */ | 292 | */ |
| 293 | usable_base = | 293 | usable_base = |
| 294 | __ALIGN_MASK(max(address_min, ent_addr), alignment - 1); | 294 | ALIGN(max(address_min, ent_addr), alignment); |
| 295 | usable_max = min(address_max, ent_addr + ent_size); | 295 | usable_max = min(address_max, ent_addr + ent_size); |
| 296 | /* | 296 | /* |
| 297 | * We should be able to allocate block at address | 297 | * We should be able to allocate block at address |
| @@ -671,7 +671,7 @@ int64_t cvmx_bootmem_phy_named_block_alloc(uint64_t size, uint64_t min_addr, | |||
| 671 | * coallesced when they are freed. The alloc routine does the | 671 | * coallesced when they are freed. The alloc routine does the |
| 672 | * same rounding up on all allocations. | 672 | * same rounding up on all allocations. |
| 673 | */ | 673 | */ |
| 674 | size = __ALIGN_MASK(size, (CVMX_BOOTMEM_ALIGNMENT_SIZE - 1)); | 674 | size = ALIGN(size, CVMX_BOOTMEM_ALIGNMENT_SIZE); |
| 675 | 675 | ||
| 676 | addr_allocated = cvmx_bootmem_phy_alloc(size, min_addr, max_addr, | 676 | addr_allocated = cvmx_bootmem_phy_alloc(size, min_addr, max_addr, |
| 677 | alignment, | 677 | alignment, |
