On 22 December 2017 at 18:34, <evan.lloyd@arm.com> wrote:
> From: Girish Pathak <girish.pathak at arm.com>
>
> This change adds CONST qualifiers (mainly to arguments
> of functions) in PL111 and HdLcd libraries.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Again, I don't see the point of using CONSTified by-value arguments.
Please explain why this code needs to be modified in this regard (and
please don't misquote the irrelevan MISRA-C spec again)
> ---
> ArmPlatformPkg/Library/HdLcd/HdLcd.c | 4 ++--
> ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> index 079fe64ccf30dc21c357298511aeb660faa67e4a..a1eeabfefe7d32e6182371e5b131ac5df0dd4dd7 100644
> --- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> +++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> @@ -56,7 +56,7 @@ GetBytesPerPixel (
> **/
> EFI_STATUS
> LcdInitialize (
> - IN EFI_PHYSICAL_ADDRESS VramBaseAddress
> + IN CONST EFI_PHYSICAL_ADDRESS VramBaseAddress
> )
> {
> // Disable the controller
> @@ -95,7 +95,7 @@ LcdInitialize (
> **/
> EFI_STATUS
> LcdSetMode (
> - IN UINT32 ModeNumber
> + IN CONST UINT32 ModeNumber
> )
> {
> EFI_STATUS Status;
> diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> index b1b7d0dd19076e3afba0d144af8d95b9f350006c..53b402f711ff10d70feba38671171c027a98b4ba 100644
> --- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> +++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> @@ -55,7 +55,7 @@ LcdIdentify (VOID)
> **/
> EFI_STATUS
> LcdInitialize (
> - IN EFI_PHYSICAL_ADDRESS VramBaseAddress
> + IN CONST EFI_PHYSICAL_ADDRESS VramBaseAddress
> )
> {
> // Define start of the VRAM. This never changes for any graphics mode
> @@ -78,7 +78,7 @@ LcdInitialize (
> **/
> EFI_STATUS
> LcdSetMode (
> - IN UINT32 ModeNumber
> + IN CONST UINT32 ModeNumber
> )
> {
> EFI_STATUS Status;
> --
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel