From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH v2 08/13] StandaloneMmPkg: Add option to use FF-A calls for communication with SPM To: Sughosh Ganu ,devel@edk2.groups.io From: "Sami Mujawar" X-Originating-Location: US (217.140.99.251) X-Originating-Platform: Windows Firefox 84 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 04 Jan 2021 09:34:24 -0800 References: <20201214144216.26328-9-sughosh.ganu@linaro.org> In-Reply-To: <20201214144216.26328-9-sughosh.ganu@linaro.org> Message-ID: <11114.1609781664151759441@groups.io> Content-Type: multipart/alternative; boundary="C8bMf7jDevhkWNRMgmmG" --C8bMf7jDevhkWNRMgmmG Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote: >=20 > + INT32 Ret; Remove trailing space. On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote: >=20 > + if (Status =3D=3D RETURN_UNSUPPORTED) > + Ret =3D -1; > + else if (Status =3D=3D RETURN_INVALID_PARAMETER) > + Ret =3D -2; > + else > + Ret =3D 0; '{' and '}' are required for if statements, see https://edk2-docs.gitbook.= io/edk-ii-c-coding-standards-specification/5_source_files/57_c_programming#= 5-7-3-4-1-the-if-statement-shall-be-followed-by-a-space-and-then-the-open-p= arenthesis Also, LocateStandaloneMmCorePeCoffData() can return EFI_NOT_FOUND. Similar= ly, other error codes could also be returned and would need to be mapped. Would it be better to have a function that does the conversion/mapping? Regards, Sami Mujawar --C8bMf7jDevhkWNRMgmmG Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 14, 2020 at 06:42 AM, Sughosh Ganu wrote:
+ INT32 Ret;
Remove trailing space.

On Mon, Dec 14, 2020 at 06:42 AM, Sughos= h Ganu wrote:
+ if (Status =3D=3D RETURN_UNSUPPORTED)
+ Ret =3D -1;
+ else if (Status =3D=3D RETURN_INVALID_PARAMETER)
+ Ret =3D -2;
+ else
+ Ret =3D 0;
'{' and '}' are required for if statements, see https://edk2-docs= .gitbook.io/edk-ii-c-coding-standards-specification/5_source_files/57_c_pro= gramming#5-7-3-4-1-the-if-statement-shall-be-followed-by-a-space-and-then-t= he-open-parenthesis

Also, Lo= cateStandaloneMmCorePeCoffData() can return EFI_NOT_FOUND. Similarly, other error codes could also be re= turned and would need to be mapped.
Would it be better to have a funct= ion that does the conversion/mapping?

Regards,

Sami M= ujawar --C8bMf7jDevhkWNRMgmmG--