From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::244; helo=mail-io0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AB30F2219BCAF for ; Sat, 23 Dec 2017 05:16:51 -0800 (PST) Received: by mail-io0-x244.google.com with SMTP id i143so7043236ioa.3 for ; Sat, 23 Dec 2017 05:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5/D0kJTmw+7ewku5O63WiSBH2WZVKPpgGrT5KduwBb4=; b=SfedQvrND7qYZdRgbH+QKQSjPTVd9jOdXegi7+G7QOH1AdIHK9kKhekuHrGl3OpKJT kwnRSK/Y3oOBf8I4SIZa0Xs08mF0BoUmwhGakpGfDjVi7INTL+0CdWn6ON/vnEy3joJO v/uy2gD0w7qWxn8o5z4sClAIIJiAZjtit16bU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5/D0kJTmw+7ewku5O63WiSBH2WZVKPpgGrT5KduwBb4=; b=QWtXLIf4gw58b5IoLINDfeMJgHy10lSbYHKREmK20MI8MwpinCqD7YuZWXlSKcGZ8h 13xwRxIhuCseHUO6HTmInIrQbG1bQdMMf927LCZ89BGbgOdJaKVTrStU1PcKKbGVLO+x guxNzW8N9oozdqciRcwZz3hHEw/lumcU9lwlPOYPvDtYyYF1zfYKGx5EEzG9CabaOiK4 OV79px6JwUqDdJFtDjzkCVvYxXkuzM0c5bfQkW45fDXP+5mUfeVleB6BvjB/NDmlpmVs yDntU1cfe/O57g2pLQkM7j5oKbKD1QxM399bnsOJtf7/1QI+iFBZVYnqEqgRcbO3U84O az/w== X-Gm-Message-State: AKGB3mJbXbJyChmvNL3HoxEEtjBrzEx6TWA/+wHJLIPFTaTL78pmIErX jxURfESbgMwgARSOfNX6owJS7prEqSyPrHE4WwLYIA== X-Google-Smtp-Source: ACJfBou6uYjuXGOGBOkPDcGLt7dBIW+bdSbezTxofR7dMSYByjkaX91ytOW3FTHBjSCbspl44wVKf5gAmycvAul4tak= X-Received: by 10.107.133.34 with SMTP id h34mr21785734iod.253.1514035302138; Sat, 23 Dec 2017 05:21:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.52.14 with HTTP; Sat, 23 Dec 2017 05:21:41 -0800 (PST) In-Reply-To: <20171222183418.8616-4-evan.lloyd@arm.com> References: <20171222183418.8616-1-evan.lloyd@arm.com> <20171222183418.8616-4-evan.lloyd@arm.com> From: Ard Biesheuvel Date: Sat, 23 Dec 2017 13:21:41 +0000 Message-ID: To: Evan Lloyd Cc: "edk2-devel@lists.01.org" , <"ard.biesheuvel@linaro.org"@arm.com>, <"leif.lindholm@linaro.org"@arm.com>, <"Matteo.Carlini@arm.com"@arm.com>, <"nd@arm.com"@arm.com> Subject: Re: [PATCH v2 03/13] ArmPlatformPkg: PL111 and HDLCD: add const qualifier X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Dec 2017 13:16:52 -0000 Content-Type: text/plain; charset="UTF-8" On 22 December 2017 at 18:34, wrote: > From: Girish Pathak > > 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 > Signed-off-by: Evan Lloyd 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") >