Commit a7ecd054 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Alpha macro standardize

Rusty Russell <rusty@rustcorp.com.au>: Trivial ALPHA patch to remove minmax macros:
  Change over to standard max and ALIGN macros.
parent 174f05b2
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/cache.h>
#include <asm/machvec.h> #include <asm/machvec.h>
#include "proto.h" #include "proto.h"
...@@ -121,8 +122,6 @@ struct pci_fixup pcibios_fixups[] __initdata = { ...@@ -121,8 +122,6 @@ struct pci_fixup pcibios_fixups[] __initdata = {
{ 0 } { 0 }
}; };
#define MAX(val1, val2) ((val1) > (val2) ? (val1) : (val2))
#define ALIGN(val,align) (((val) + ((align) - 1)) & ~((align) - 1))
#define KB 1024 #define KB 1024
#define MB (1024*KB) #define MB (1024*KB)
#define GB (1024*MB) #define GB (1024*MB)
...@@ -169,7 +168,7 @@ pcibios_align_resource(void *data, struct resource *res, ...@@ -169,7 +168,7 @@ pcibios_align_resource(void *data, struct resource *res,
*/ */
/* Align to multiple of size of minimum base. */ /* Align to multiple of size of minimum base. */
alignto = MAX(0x1000, align); alignto = max(0x1000UL, align);
start = ALIGN(start, alignto); start = ALIGN(start, alignto);
if (hose->sparse_mem_base && size <= 7 * 16*MB) { if (hose->sparse_mem_base && size <= 7 * 16*MB) {
if (((start / (16*MB)) & 0x7) == 0) { if (((start / (16*MB)) & 0x7) == 0) {
...@@ -187,8 +186,6 @@ pcibios_align_resource(void *data, struct resource *res, ...@@ -187,8 +186,6 @@ pcibios_align_resource(void *data, struct resource *res,
res->start = start; res->start = start;
} }
#undef MAX
#undef ALIGN
#undef KB #undef KB
#undef MB #undef MB
#undef GB #undef GB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment