diff options
author | Milind Arun Choudhary <milindchoudhary@gmail.com> | 2007-05-13 19:24:59 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-05-13 19:24:59 -0400 |
commit | 47e77eeecf0b7892bba8a697c228ab846fea7a0f (patch) | |
tree | 31cb58008529e07c3a2917094fc9de8336e81b0f /arch/sh64/kernel | |
parent | 705962ccc9d21a08b74b6b6e1d3cf10f98968a67 (diff) |
sh64: ROUND_UP macro cleanup in arch/sh64/kernel/pci_sh5.c
ROUND_UP macro cleanup, use ALIGN where ever appropriate.
Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh64/kernel')
-rw-r--r-- | arch/sh64/kernel/pci_sh5.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 49862e165c06..649b33667748 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c | |||
@@ -375,8 +375,6 @@ irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs) | |||
375 | return IRQ_NONE; | 375 | return IRQ_NONE; |
376 | } | 376 | } |
377 | 377 | ||
378 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) | ||
379 | |||
380 | static void __init | 378 | static void __init |
381 | pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | 379 | pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, |
382 | struct resource *memr) | 380 | struct resource *memr) |
@@ -433,8 +431,8 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | |||
433 | mem_res.end -= mem_res.start; | 431 | mem_res.end -= mem_res.start; |
434 | 432 | ||
435 | /* Align the sizes up by bridge rules */ | 433 | /* Align the sizes up by bridge rules */ |
436 | io_res.end = ROUND_UP(io_res.end, 4*1024) - 1; | 434 | io_res.end = ALIGN(io_res.end, 4*1024) - 1; |
437 | mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1; | 435 | mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1; |
438 | 436 | ||
439 | /* Adjust the bridge's allocation requirements */ | 437 | /* Adjust the bridge's allocation requirements */ |
440 | bridge->resource[0].end = bridge->resource[0].start + io_res.end; | 438 | bridge->resource[0].end = bridge->resource[0].start + io_res.end; |
@@ -447,18 +445,16 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, | |||
447 | 445 | ||
448 | /* adjust parent's resource requirements */ | 446 | /* adjust parent's resource requirements */ |
449 | if (ior) { | 447 | if (ior) { |
450 | ior->end = ROUND_UP(ior->end, 4*1024); | 448 | ior->end = ALIGN(ior->end, 4*1024); |
451 | ior->end += io_res.end; | 449 | ior->end += io_res.end; |
452 | } | 450 | } |
453 | 451 | ||
454 | if (memr) { | 452 | if (memr) { |
455 | memr->end = ROUND_UP(memr->end, 1*1024*1024); | 453 | memr->end = ALIGN(memr->end, 1*1024*1024); |
456 | memr->end += mem_res.end; | 454 | memr->end += mem_res.end; |
457 | } | 455 | } |
458 | } | 456 | } |
459 | 457 | ||
460 | #undef ROUND_UP | ||
461 | |||
462 | static void __init pcibios_size_bridges(void) | 458 | static void __init pcibios_size_bridges(void) |
463 | { | 459 | { |
464 | struct resource io_res, mem_res; | 460 | struct resource io_res, mem_res; |