summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2002-05-21 22:23:00 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-05-21 22:23:00 -0700
commitaa2364b8080994fa14dc50662052045f03024513 (patch)
tree4385cb6e65988f8ab2bf1edda5396f3666e4fc72
parentf6581020efd75d0c43219bc2797352bd04e80a21 (diff)
[PATCH] MIPS min/max replacement II
(Once again, Ralf said straight to you). Rusty Russell <rusty@rustcorp.com.au>: Trivial MIPS gt64120-pci patch to remove minmax macros: Also changes over to standard ALIGN macro:
-rw-r--r--arch/mips/gt64120/common/pci.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/mips/gt64120/common/pci.c b/arch/mips/gt64120/common/pci.c
index 93283099cccc..93cf58a13f41 100644
--- a/arch/mips/gt64120/common/pci.c
+++ b/arch/mips/gt64120/common/pci.c
@@ -41,6 +41,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/version.h>
+#include <linux/cache.h>
#include <asm/pci.h>
#include <asm/io.h>
#include <asm/gt64120/gt64120.h>
@@ -1014,9 +1015,6 @@ static u32 __init scan_pci_bus(struct pci_device *pci_devices)
return arrayCounter;
}
-#define ALIGN(val,align) (((val) + ((align) - 1)) & ~((align) - 1))
-#define MAX(val1, val2) ((val1) > (val2) ? (val1) : (val2))
-
/*
* This function goes through the list of devices and allocates the BARs in
* either IO or MEM space. It does it in order of size, which will limit the
@@ -1071,14 +1069,14 @@ static void __init allocate_pci_space(struct pci_device *pci_devices)
device.devfn =
PCI_DEVFN(pci_devices[maxDevice].slot, 0);
if (pci_devices[maxDevice].BARtype[maxBAR] == 1) {
- alignto = MAX(0x1000, maxSize);
+ alignto = max(0x1000U, maxSize);
base = ALIGN(pci0_io_base, alignto);
pci0WriteConfigReg(PCI_BASE_ADDRESS_0 +
(maxBAR * 4), &device,
base | 0x1);
pci0_io_base = base + alignto;
} else {
- alignto = MAX(0x1000, maxSize);
+ alignto = max(0x1000U, maxSize);
base = ALIGN(pci0_mem_base, alignto);
pci0WriteConfigReg(PCI_BASE_ADDRESS_0 +
(maxBAR * 4), &device,