[edk2-devel] [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros
Sami Mujawar
sami.mujawar at arm.com
Thu Jun 27 13:12:12 UTC 2019
Replaced the use of unsafe/deprecated macros with alternate safe
options.
Signed-off-by: Sami Mujawar <sami.mujawar at arm.com>
---
Notes:
v1:
- Replace unsafe/deprecated macros with alternate safe options. [SAMI]
Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index c5967f5b7112fbf794573a6040711a9f1cc14c9f..ea7591d704439cd4216f3e3d7155df2b4d2482b3 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2013-2017, ARM Limited. All rights reserved.
+* Copyright (c) 2013-2019, ARM Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*
@@ -407,7 +407,6 @@ ArmJunoEntryPoint (
EFI_PHYSICAL_ADDRESS HypBase;
CHAR16 *TextDevicePath;
UINTN TextDevicePathSize;
- VOID *Buffer;
UINT32 JunoRevision;
EFI_EVENT EndOfDxeEvent;
@@ -495,7 +494,7 @@ ArmJunoEntryPoint (
//
if (JunoRevision != JUNO_REVISION_R0) {
// Enable PCI enumeration
- PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
+ PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);
//
// Create an event belonging to the "gEfiEndOfDxeEventGroupGuid" group.
@@ -531,8 +530,11 @@ ArmJunoEntryPoint (
TextDevicePath = (CHAR16*)FixedPcdGetPtr (PcdJunoFdtDevicePath);
if (TextDevicePath != NULL) {
TextDevicePathSize = StrSize (TextDevicePath);
- Buffer = PcdSetPtr (PcdFdtDevicePaths, &TextDevicePathSize, TextDevicePath);
- Status = (Buffer != NULL) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
+ Status = PcdSetPtrS (
+ PcdFdtDevicePaths,
+ &TextDevicePathSize,
+ TextDevicePath
+ );
} else {
Status = EFI_NOT_FOUND;
}
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#42932): https://edk2.groups.io/g/devel/message/42932
Mute This Topic: https://groups.io/mt/32230897/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list