From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: dandan.bi@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Wed, 18 Sep 2019 18:47:30 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2019 18:47:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,522,1559545200"; d="scan'208";a="212062135" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 18 Sep 2019 18:47:28 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Sep 2019 18:47:30 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 18 Sep 2019 18:47:30 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Thu, 19 Sep 2019 09:47:27 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "lersek@redhat.com" CC: "Dong, Eric" , "Wu, Hao A" , "Wang, Jian J" , "Gao, Liming" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 16/35] MdeModulePkg/S3SaveState: cast Position for S3BootScriptLib explicitly Thread-Topic: [edk2-devel] [PATCH 16/35] MdeModulePkg/S3SaveState: cast Position for S3BootScriptLib explicitly Thread-Index: AQHVbZEnL3cJO5XtlkmzfVxiITDw9KcyPS+Q Date: Thu, 19 Sep 2019 01:47:27 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40C5DA0E@SHSMSX104.ccr.corp.intel.com> References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-17-lersek@redhat.com> In-Reply-To: <20190917194935.24322-17-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Laszlo Ersek > Sent: Wednesday, September 18, 2019 3:49 AM > To: edk2-devel-groups-io > Cc: Bi, Dandan ; Dong, Eric ; > Wu, Hao A ; Wang, Jian J ; > Gao, Liming ; Ni, Ray > Subject: [edk2-devel] [PATCH 16/35] MdeModulePkg/S3SaveState: cast > Position for S3BootScriptLib explicitly >=20 > 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. >=20 > The callees take the in/out parameter "Position" as (VOID**). Add explici= t > casts for clarity. >=20 > There is no change in functionality. >=20 > Cc: Dandan Bi > Cc: Eric Dong > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Liming Gao > Cc: Ray Ni > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > lightly tested: multiple drivers in OVMF write S3 boot script fragmen= ts >=20 > MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c | 4 ++-- > MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c | 4 > ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c > b/MdeModulePkg/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 > + **)Position); > } > return Status; > } > @@ -851,7 +851,7 @@ BootScriptLabel ( > IN CONST CHAR8 *Label > ) > { > - return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, > Label); > + return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID > + **)Position, 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 > + **)Position); > } > return Status; > } > @@ -849,7 +849,7 @@ BootScriptLabel ( > IN CONST CHAR8 *Label > ) > { > - return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, > Label); > + return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, (VOID > + **)Position, Label); > } > /** > Compare two positions in the boot script table and return their relati= ve > position. > -- > 2.19.1.3.g30247aa5d201 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. >=20 > View/Reply Online (#47403): https://edk2.groups.io/g/devel/message/47403 > Mute This Topic: https://groups.io/mt/34180217/1768738 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub [dandan.bi@intel.com] > -=3D-=3D-=3D-=3D-=3D-=3D