[PATCH] efi: fix type in efi_mem_type()
From: Marek Marczykowski-Górecki
Date: Tue Mar 10 2026 - 15:10:18 EST
Drop const, as use of efi_mem_desc_lookup() will modify the variable.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202603101851.bAhG7uGN-lkp@xxxxxxxxx/
Fixes: 5992265762e6 "efi: make efi_mem_type() and efi_mem_attributes() work on Xen PV"
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
drivers/firmware/efi/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 36efc92bdf02..288834a193d1 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -1001,7 +1001,7 @@ u64 efi_mem_attributes(unsigned long phys_addr)
*/
int efi_mem_type(unsigned long phys_addr)
{
- const efi_memory_desc_t md;
+ efi_memory_desc_t md;
if (!efi_enabled(EFI_MEMMAP) && !efi_enabled(EFI_PARAVIRT))
return -ENOTSUPP;
--
2.52.0