]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Consolidate MAX/MIN definitions
authorAndy Fleming <afleming@freescale.com>
Thu, 30 Oct 2008 22:35:30 +0000 (17:35 -0500)
committerWolfgang Denk <wd@denx.de>
Sun, 2 Nov 2008 15:23:46 +0000 (16:23 +0100)
There were several, now there is one (two if you count the lower-case
versions).

Signed-off-by: Andy Fleming <afleming@freescale.com>
board/delta/nand.c
board/zylonite/nand.c
common/cmd_bedbug.c
common/cmd_elf.c
cpu/ixp/npe/include/IxEthDB_p.h
include/common.h
include/usbdcore.h

index 14382f5a8546ad8acfb8134636051ebfea708c4b..aff7c54fc2460975910815b8518f7d103357d5f2 100644 (file)
@@ -46,8 +46,6 @@
 # define DFC_DEBUG3(fmt, args...)
 #endif
 
-#define MIN(x, y)              ((x < y) ? x : y)
-
 /* These really don't belong here, as they are specific to the NAND Model */
 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
 
index 895fb2bacdf8e5e20d8ca4712d54c08f5b5181a9..899445ee6baec15ca2464b9ad123e1e3d43f6e3a 100644 (file)
@@ -46,8 +46,6 @@
 # define DFC_DEBUG3(fmt, args...)
 #endif
 
-#define MIN(x, y)              ((x < y) ? x : y)
-
 /* These really don't belong here, as they are specific to the NAND Model */
 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
 
index 3e597f98207757d5d81424cd5e1b16511c53654b..e6277c940860b8b301a3bd8cc683e2737b73442b 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
 extern void show_regs __P ((struct pt_regs *));
 extern int run_command __P ((const char *, int));
 extern char console_buffer[];
index 3ebb6d9354436c88a1e6f008198b69dd4efc6074..4d8e1d2762df420ea55017d6f2ec08012b978a6f 100644 (file)
 DECLARE_GLOBAL_DATA_PTR;
 #endif
 
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
 int valid_elf_image (unsigned long addr);
 unsigned long load_elf_image (unsigned long addr);
 
index e7c67ae520d16ab3ea2367b784caf2b845fdb5d5..ccec7ea7be22f3b143526a9e83cb8b31514a3749 100644 (file)
@@ -193,8 +193,6 @@ extern int overflowEvent;
 #define LEFT  (-1)
 
 /* macros */
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-
 #define IX_ETH_DB_CHECK_PORT_EXISTS(portID) \
 { \
     if ((portID) >= IX_ETH_DB_NUMBER_OF_PORTS) \
index b8a654a8ad0dde97e863922466083b1fe24e59e8..df64bf0f4198b841a38c44d16c442b3b1dbd522c 100644 (file)
@@ -177,6 +177,9 @@ typedef void (interrupt_handler_t)(void *);
        ({ typeof (X) __x = (X), __y = (Y);     \
                (__x > __y) ? __x : __y; })
 
+#define MIN(x, y)  min(x, y)
+#define MAX(x, y)  max(x, y)
+
 
 /**
  * container_of - cast a member of a structure out to the containing structure
index cb2be72804a4f1ca6b3b83e2b63395353f61a6d0..206dbbc864e52fb8d9dc8c7231c35af976f92a5f 100644 (file)
                                })
 #endif
 
-#ifndef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
-
 /*
  * Structure member address manipulation macros.
  * These are used by client code (code using the urb_link routines), since