[PATCH 16/35] MdeModulePkg/S3SaveState: cast Position for S3BootScriptLib explicitly


Laszlo Ersek
 

The BootScriptInsert() and BootScriptLabel() functions take the in/out
parameter "Position" as (EFI_S3_BOOT_SCRIPT_POSITION*), and pass it to
S3BootScriptMoveLastOpcode() and S3BootScriptLabel(), respectively.

The callees take the in/out parameter "Position" as (VOID**). Add explici=
t
casts for clarity.

There is no change in functionality.

Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
lightly tested: multiple drivers in OVMF write S3 boot script fragmen=
ts

MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c | 4 ++--
MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c b/M=
deModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c
index e94d15772d78..cfa8ebbd2f5d 100644
--- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c
+++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c
@@ -810,7 +810,7 @@ BootScriptInsert (
}
=20
if (!EFI_ERROR (Status)) {
- Status =3D S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);
+ Status =3D S3BootScriptMoveLastOpcode (BeforeOrAfter, (VOID **)Positi=
on);
}
return Status;
}
@@ -851,7 +851,7 @@ BootScriptLabel (
IN CONST CHAR8 *Label
)
{
- return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, L=
abel);
+ return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID **)Po=
sition, Label);
}
/**
Compare two positions in the boot script table and return their relati=
ve position.
diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c =
b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c
index 9637df4fb82a..fc6d29e48ba9 100644
--- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c
+++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c
@@ -808,7 +808,7 @@ BootScriptInsert (
}
=20
if (!EFI_ERROR (Status)) {
- Status =3D S3BootScriptMoveLastOpcode (BeforeOrAfter, Position);
+ Status =3D S3BootScriptMoveLastOpcode (BeforeOrAfter, (VOID **)Positi=
on);
}
return Status;
}
@@ -849,7 +849,7 @@ BootScriptLabel (
IN CONST CHAR8 *Label
)
{
- return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, L=
abel);
+ return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID **)Po=
sition, Label);
}
/**
Compare two positions in the boot script table and return their relati=
ve position.
--=20
2.19.1.3.g30247aa5d201

Join devel@edk2.groups.io to automatically receive all group messages.