]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_loader: add missing const qualifier
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Fri, 22 Oct 2021 11:24:24 +0000 (20:24 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 25 Oct 2021 19:13:06 +0000 (21:13 +0200)
This commit fixes the following compilation warning
of boottime->install_configuration_table() function.

lib/efi_selftest/efi_selftest_tcg2.c:475:46:
warning: passing argument 1 of ‘boottime->install_configuration_table’
discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  ret = boottime->install_configuration_table(&smbios_guid, dmi);

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
include/efi_api.h
lib/efi_loader/efi_boottime.c

index c8f959bb720d7cfbc56a4cc1dc52cb1c884d6c07..0accad08c8e00050baa9e225eeddd5de36f179b5 100644 (file)
@@ -120,7 +120,7 @@ struct efi_boot_services {
                        struct efi_device_path **device_path,
                        efi_handle_t *device);
        efi_status_t (EFIAPI *install_configuration_table)(
-                       efi_guid_t *guid, void *table);
+                       const efi_guid_t *guid, void *table);
 
        efi_status_t (EFIAPI *load_image)(bool boot_policiy,
                        efi_handle_t parent_image,
index f0283b539e46ce1b27eabac7997193dd863b89d5..352c2db25ab9fe0d6fec554f562740e136135b42 100644 (file)
@@ -1690,8 +1690,9 @@ out:
  *
  * Return: status code
  */
-static efi_status_t EFIAPI efi_install_configuration_table_ext(efi_guid_t *guid,
-                                                              void *table)
+static efi_status_t
+EFIAPI efi_install_configuration_table_ext(const efi_guid_t *guid,
+                                          void *table)
 {
        EFI_ENTRY("%pUl, %p", guid, table);
        return EFI_EXIT(efi_install_configuration_table(guid, table));