diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-05 11:17:11 -0600 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-06 13:59:34 -0800 |
commit | ea7f1b6ee9dc96c5827b06ba21d7769d553efb7d (patch) | |
tree | 5f64ed20526f7e2b6505ef86f49314e8aa341ed8 /arch | |
parent | 0efea0006335a2425b1a12a2ad35efad626fe353 (diff) | |
download | kernel_samsung_smdk4412-ea7f1b6ee9dc96c5827b06ba21d7769d553efb7d.zip kernel_samsung_smdk4412-ea7f1b6ee9dc96c5827b06ba21d7769d553efb7d.tar.gz kernel_samsung_smdk4412-ea7f1b6ee9dc96c5827b06ba21d7769d553efb7d.tar.bz2 |
x86/PCI: remove 64-bit division
The roundup() caused a build error (undefined reference to `__udivdi3').
We're aligning to power-of-two boundaries, so it's simpler to just use
ALIGN() anyway, which avoids the division.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 8ddf4f4..959e548 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c @@ -69,17 +69,17 @@ align_resource(struct acpi_device *bridge, struct resource *res) * that claim this address space have starting alignment and length * constraints, so fix any obvious BIOS goofs. */ - if (res->start & (align - 1)) { + if (!IS_ALIGNED(res->start, align)) { dev_printk(KERN_DEBUG, &bridge->dev, "host bridge window %pR invalid; " "aligning start to %d-byte boundary\n", res, align); res->start &= ~(align - 1); } - if ((res->end + 1) & (align - 1)) { + if (!IS_ALIGNED(res->end + 1, align)) { dev_printk(KERN_DEBUG, &bridge->dev, "host bridge window %pR invalid; " "aligning end to %d-byte boundary\n", res, align); - res->end = roundup(res->end, align) - 1; + res->end = ALIGN(res->end, align) - 1; } } |