]> git.sur5r.net Git - u-boot/commitdiff
efi_loader: efi_dp_match should have const arguments
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 26 Oct 2017 17:25:48 +0000 (19:25 +0200)
committerAlexander Graf <agraf@suse.de>
Fri, 1 Dec 2017 12:22:56 +0000 (13:22 +0100)
efi_dp_match does not change its arguments.
So they should be marked as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_loader.h
lib/efi_loader/efi_device_path.c

index 2bcca3dfd8b2e4ec3b11d5c8e932536740964acf..5fe17b0c091ce0da38405af378db2f3cacb9f3b2 100644 (file)
@@ -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);
index f6e368e029bdf37a768d54b9291c104fda8a30db..024877161bd78408febc31a72a3b843e73ea1339 100644 (file)
@@ -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;