Replace EFI_MAX() with MAX()

Replace EFI_MIN() with MIN()


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3631 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2007-08-14 00:00:01 +00:00
parent 4cd79ac6e5
commit a1e3528b31
5 changed files with 7 additions and 17 deletions

View File

@ -754,7 +754,7 @@ PioReadWriteData (
WordCount = WordCount & 0xffff; WordCount = WordCount & 0xffff;
WordCount /= 2; WordCount /= 2;
WordCount = EFI_MIN (WordCount, (RequiredWordCount - ActualWordCount)); WordCount = MIN (WordCount, (RequiredWordCount - ActualWordCount));
if (Read) { if (Read) {
IDEReadPortWMultiple ( IDEReadPortWMultiple (

View File

@ -393,7 +393,7 @@ IDEBusDriverBindingStart (
continue; continue;
} }
EndIdeDevice = (UINT8) EFI_MIN ((MaxDevices - 1), EndIdeDevice); EndIdeDevice = (UINT8) MIN ((MaxDevices - 1), EndIdeDevice);
// //
// Now inform the IDE Controller Init Module. Sept10 // Now inform the IDE Controller Init Module. Sept10

View File

@ -43,8 +43,6 @@
// //
// Extra Definition to porting // Extra Definition to porting
// //
#define EFI_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX_IDE_DEVICE 4 #define MAX_IDE_DEVICE 4
#define MAX_IDE_CHANNELS 2 #define MAX_IDE_CHANNELS 2
#define MAX_IDE_DRIVES 2 #define MAX_IDE_DRIVES 2

View File

@ -15,12 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "PciResourceSupport.h" #include "PciResourceSupport.h"
#include <IndustryStandard/Pci23.h> #include <IndustryStandard/Pci23.h>
//
// Min Max
//
#define EFI_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define EFI_MAX(a, b) (((a) > (b)) ? (a) : (b))
EFI_STATUS EFI_STATUS
GetOpRomInfo ( GetOpRomInfo (
@ -245,7 +239,7 @@ Returns:
// of the legacy length and the PCIR Image Length // of the legacy length and the PCIR Image Length
// //
if (CodeType == PCI_CODE_TYPE_PCAT_IMAGE) { if (CodeType == PCI_CODE_TYPE_PCAT_IMAGE) {
RomImageSize = EFI_MAX(RomImageSize, (((EFI_LEGACY_EXPANSION_ROM_HEADER *)RomHeader)->Size512 * 512)); RomImageSize = MAX(RomImageSize, (((EFI_LEGACY_EXPANSION_ROM_HEADER *)RomHeader)->Size512 * 512));
} }
if (RomImageSize > 0) { if (RomImageSize > 0) {

View File

@ -16,8 +16,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Ui.h" #include "Ui.h"
#include "Colors.h" #include "Colors.h"
#define EFI_MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b))
EFI_STATUS EFI_STATUS
ReadString( ReadString(
IN UI_MENU_OPTION *MenuOption, IN UI_MENU_OPTION *MenuOption,
@ -298,7 +296,7 @@ Error:
// Display error popup // Display error popup
// //
WidthOfString = GetStringWidth (Packet->String); WidthOfString = GetStringWidth (Packet->String);
ScreenSize = EFI_MAX(WidthOfString, GetStringWidth (gPressEnter)) / 2; ScreenSize = MAX(WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter); CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter);
FreePool (Packet); FreePool (Packet);
@ -407,11 +405,11 @@ Error:
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
if (Packet->String == NULL) { if (Packet->String == NULL) {
WidthOfString = GetStringWidth (gConfirmError); WidthOfString = GetStringWidth (gConfirmError);
ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2; ScreenSize = MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter); CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter);
} else { } else {
WidthOfString = GetStringWidth (Packet->String); WidthOfString = GetStringWidth (Packet->String);
ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2; ScreenSize = MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter); CreatePopUp (ScreenSize, 4, &NullCharacter, Packet->String, gPressEnter, &NullCharacter);
FreePool (Packet); FreePool (Packet);
} }
@ -455,7 +453,7 @@ Error:
goto Done; goto Done;
} else { } else {
WidthOfString = GetStringWidth (gConfirmError); WidthOfString = GetStringWidth (gConfirmError);
ScreenSize = EFI_MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2; ScreenSize = MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;
CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter); CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter);
StringPtr[0] = CHAR_NULL; StringPtr[0] = CHAR_NULL;
do { do {