提交 6f6f8c2f 编写于 作者: M Milind Arun Choudhary 提交者: Greg Kroah-Hartman

PCI: ROUND_UP macro cleanup in drivers/pci

ROUND_UP macro cleanup, use ALIGN where ever appropriate
Signed-off-by: NMilind Arun Choudhary <milindchoudhary@gmail.com>
Acked-by: NScott Murray <scottm@somanetworks.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 caa51716
...@@ -45,8 +45,6 @@ extern int cpci_debug; ...@@ -45,8 +45,6 @@ extern int cpci_debug;
#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg) #define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg) #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
u8 cpci_get_attention_status(struct slot* slot) u8 cpci_get_attention_status(struct slot* slot)
{ {
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#define DBG(x...) #define DBG(x...)
#endif #endif
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
static void pbus_assign_resources_sorted(struct pci_bus *bus) static void pbus_assign_resources_sorted(struct pci_bus *bus)
{ {
struct pci_dev *dev; struct pci_dev *dev;
...@@ -310,7 +308,7 @@ static void pbus_size_io(struct pci_bus *bus) ...@@ -310,7 +308,7 @@ static void pbus_size_io(struct pci_bus *bus)
#if defined(CONFIG_ISA) || defined(CONFIG_EISA) #if defined(CONFIG_ISA) || defined(CONFIG_EISA)
size = (size & 0xff) + ((size & ~0xffUL) << 2); size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif #endif
size = ROUND_UP(size + size1, 4096); size = ALIGN(size + size1, 4096);
if (!size) { if (!size) {
b_res->flags = 0; b_res->flags = 0;
return; return;
...@@ -378,11 +376,11 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long ...@@ -378,11 +376,11 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long
if (!align) if (!align)
min_align = align1; min_align = align1;
else if (ROUND_UP(align + min_align, min_align) < align1) else if (ALIGN(align + min_align, min_align) < align1)
min_align = align1 >> 1; min_align = align1 >> 1;
align += aligns[order]; align += aligns[order];
} }
size = ROUND_UP(size, min_align); size = ALIGN(size, min_align);
if (!size) { if (!size) {
b_res->flags = 0; b_res->flags = 0;
return 1; return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册