]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
efi/libstub: smbios: Drop unused 'recsize' parameter
authorArd Biesheuvel <ardb@kernel.org>
Wed, 22 Mar 2023 14:26:21 +0000 (15:26 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 13 Apr 2023 08:17:04 +0000 (10:17 +0200)
BugLink: https://bugs.launchpad.net/bugs/2015741
We no longer use the recsize argument for locating the string table in
an SMBIOS record, so we can drop it from the internal API.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/smbios.c

index 98a368d366d75db7b7231e9ef34640285521c3cb..15d56150fa1b230d08b893fe510622a862aba658 100644 (file)
@@ -1102,13 +1102,12 @@ struct efi_smbios_type4_record {
 };
 
 #define efi_get_smbios_string(__record, __type, __name) ({             \
-       int size = sizeof(struct efi_smbios_type ## __type ## _record); \
        int off = offsetof(struct efi_smbios_type ## __type ## _record, \
                           __name);                                     \
-       __efi_get_smbios_string((__record), __type, off, size);         \
+       __efi_get_smbios_string((__record), __type, off);               \
 })
 
 const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record,
-                                 u8 type, int offset, int recsize);
+                                 u8 type, int offset);
 
 #endif
index f9c159c28f4613f86410107f7f2740b04db548dd..c217de2cc8d56dc2796679f207772ff1288ba3d4 100644 (file)
@@ -38,7 +38,7 @@ const struct efi_smbios_record *efi_get_smbios_record(u8 type)
 }
 
 const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record,
-                                 u8 type, int offset, int recsize)
+                                 u8 type, int offset)
 {
        const u8 *strtable;