Commit 20d04774f4ef3f6e38974636e0e36ae0f0b5501f

Authored by Andy Fleming
Committed by Wolfgang Denk
1 parent 298e476c66

Consolidate MAX/MIN definitions

There were several, now there is one (two if you count the lower-case
versions).

Signed-off-by: Andy Fleming <afleming@freescale.com>

Showing 7 changed files with 3 additions and 22 deletions Side-by-side Diff

... ... @@ -46,8 +46,6 @@
46 46 # define DFC_DEBUG3(fmt, args...)
47 47 #endif
48 48  
49   -#define MIN(x, y) ((x < y) ? x : y)
50   -
51 49 /* These really don't belong here, as they are specific to the NAND Model */
52 50 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
53 51  
board/zylonite/nand.c
... ... @@ -46,8 +46,6 @@
46 46 # define DFC_DEBUG3(fmt, args...)
47 47 #endif
48 48  
49   -#define MIN(x, y) ((x < y) ? x : y)
50   -
51 49 /* These really don't belong here, as they are specific to the NAND Model */
52 50 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
53 51  
... ... @@ -13,10 +13,6 @@
13 13  
14 14 DECLARE_GLOBAL_DATA_PTR;
15 15  
16   -#ifndef MAX
17   -#define MAX(a,b) ((a) > (b) ? (a) : (b))
18   -#endif
19   -
20 16 extern void show_regs __P ((struct pt_regs *));
21 17 extern int run_command __P ((const char *, int));
22 18 extern char console_buffer[];
... ... @@ -23,10 +23,6 @@
23 23 DECLARE_GLOBAL_DATA_PTR;
24 24 #endif
25 25  
26   -#ifndef MAX
27   -#define MAX(a,b) ((a) > (b) ? (a) : (b))
28   -#endif
29   -
30 26 int valid_elf_image (unsigned long addr);
31 27 unsigned long load_elf_image (unsigned long addr);
32 28  
cpu/ixp/npe/include/IxEthDB_p.h
... ... @@ -193,8 +193,6 @@
193 193 #define LEFT (-1)
194 194  
195 195 /* macros */
196   -#define MIN(a, b) ((a) < (b) ? (a) : (b))
197   -
198 196 #define IX_ETH_DB_CHECK_PORT_EXISTS(portID) \
199 197 { \
200 198 if ((portID) >= IX_ETH_DB_NUMBER_OF_PORTS) \
... ... @@ -177,6 +177,9 @@
177 177 ({ typeof (X) __x = (X), __y = (Y); \
178 178 (__x > __y) ? __x : __y; })
179 179  
  180 +#define MIN(x, y) min(x, y)
  181 +#define MAX(x, y) max(x, y)
  182 +
180 183  
181 184 /**
182 185 * container_of - cast a member of a structure out to the containing structure
... ... @@ -126,14 +126,6 @@
126 126 })
127 127 #endif
128 128  
129   -#ifndef MIN
130   -#define MIN(a,b) ((a) < (b) ? (a) : (b))
131   -#endif
132   -#ifndef MAX
133   -#define MAX(a,b) ((a) > (b) ? (a) : (b))
134   -#endif
135   -
136   -
137 129 /*
138 130 * Structure member address manipulation macros.
139 131 * These are used by client code (code using the urb_link routines), since