diff mbox series

[U-Boot,07/18] efi_loader: efi_dp_match should have const arguments

Message ID 20171026172559.26639-8-xypron.glpk@gmx.de
State Accepted
Commit ff401d3f81bb8cfcec28162de07236a355aa3212
Delegated to: Alexander Graf
Headers show
Series efi_loader: refactor protocols management | expand

Commit Message

Heinrich Schuchardt Oct. 26, 2017, 5:25 p.m. UTC
efi_dp_match does not change its arguments.
So they should be marked as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 include/efi_loader.h             | 3 ++-
 lib/efi_loader/efi_device_path.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/include/efi_loader.h b/include/efi_loader.h
index 2bcca3dfd8..5fe17b0c09 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -252,7 +252,8 @@  extern void *efi_bounce_buffer;
 
 
 struct efi_device_path *efi_dp_next(const struct efi_device_path *dp);
-int efi_dp_match(struct efi_device_path *a, struct efi_device_path *b);
+int efi_dp_match(const struct efi_device_path *a,
+		 const struct efi_device_path *b);
 struct efi_object *efi_dp_find_obj(struct efi_device_path *dp,
 				   struct efi_device_path **rem);
 unsigned efi_dp_size(const struct efi_device_path *dp);
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index f6e368e029..024877161b 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -68,7 +68,8 @@  struct efi_device_path *efi_dp_next(const struct efi_device_path *dp)
  * representing a device with one representing a file on the device, or
  * a device with a parent device.
  */
-int efi_dp_match(struct efi_device_path *a, struct efi_device_path *b)
+int efi_dp_match(const struct efi_device_path *a,
+		 const struct efi_device_path *b)
 {
 	while (1) {
 		int ret;