diff options
author | Milind Arun Choudhary <milindchoudhary@gmail.com> | 2007-05-14 08:24:59 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-05-14 08:24:59 +0900 |
commit | 47e77eeecf0b7892bba8a697c228ab846fea7a0f (patch) | |
tree | 31cb58008529e07c3a2917094fc9de8336e81b0f /arch/sh64/kernel/pci_sh5.c | |
parent | 705962ccc9d21a08b74b6b6e1d3cf10f98968a67 (diff) | |
download | lwn-47e77eeecf0b7892bba8a697c228ab846fea7a0f.tar.gz lwn-47e77eeecf0b7892bba8a697c228ab846fea7a0f.zip |
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/pci_sh5.c')
-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) return IRQ_NONE; } -#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) - static void __init pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, struct resource *memr) @@ -433,8 +431,8 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, mem_res.end -= mem_res.start; /* Align the sizes up by bridge rules */ - io_res.end = ROUND_UP(io_res.end, 4*1024) - 1; - mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1; + io_res.end = ALIGN(io_res.end, 4*1024) - 1; + mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1; /* Adjust the bridge's allocation requirements */ 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, /* adjust parent's resource requirements */ if (ior) { - ior->end = ROUND_UP(ior->end, 4*1024); + ior->end = ALIGN(ior->end, 4*1024); ior->end += io_res.end; } if (memr) { - memr->end = ROUND_UP(memr->end, 1*1024*1024); + memr->end = ALIGN(memr->end, 1*1024*1024); memr->end += mem_res.end; } } -#undef ROUND_UP - static void __init pcibios_size_bridges(void) { struct resource io_res, mem_res; |