From: Doug Goldstein Subject: [PATCH] efi: mark input variables to funcs as const Date: Sat, 5 Dec 2015 14:25:34 -0600 Message-ID: <1449347134-12299-1-git-send-email-cardoe@cardoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Doug Goldstein , Jan Beulich List-Id: xen-devel@lists.xenproject.org Variables that are input (IN) variables to EFI functions should be marked as const. Just avoid potential problems of changing data that shouldn't be changed. Signed-off-by: Doug Goldstein --- So I find myself constantly doing something similar to this when troubleshooting EFI because I like to put print statements to see data and figure out where problems are. The EFI print functions all take const data but much of the data is not marked as const. If you don't like this that's fine but I was looking at the 3 different EFI branches I have locally and this change is in all 3 in one shape or another. --- xen/include/efi/efidef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/efi/efidef.h b/xen/include/efi/efidef.h index 86a7e11..1d1c779 100644 --- a/xen/include/efi/efidef.h +++ b/xen/include/efi/efidef.h @@ -50,7 +50,7 @@ typedef VOID *EFI_EVENT; // #ifndef IN - #define IN + #define IN const #define OUT #define OPTIONAL #endif -- 2.4.10