Skip to content

Commit 77dd8ad

Browse files
committed
efi: Drop unused efi_range_is_wc() function
efi_range_is_wc() has no callers, so remove it. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
1 parent eaeff84 commit 77dd8ad

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

include/linux/efi.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -832,27 +832,6 @@ extern int __init parse_efi_signature_list(
832832
const void *data, size_t size,
833833
efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *));
834834

835-
/**
836-
* efi_range_is_wc - check the WC bit on an address range
837-
* @start: starting kvirt address
838-
* @len: length of range
839-
*
840-
* Consult the EFI memory map and make sure it's ok to set this range WC.
841-
* Returns true or false.
842-
*/
843-
static inline int efi_range_is_wc(unsigned long start, unsigned long len)
844-
{
845-
unsigned long i;
846-
847-
for (i = 0; i < len; i += (1UL << EFI_PAGE_SHIFT)) {
848-
unsigned long paddr = __pa(start + i);
849-
if (!(efi_mem_attributes(paddr) & EFI_MEMORY_WC))
850-
return 0;
851-
}
852-
/* The range checked out */
853-
return 1;
854-
}
855-
856835
/*
857836
* We play games with efi_enabled so that the compiler will, if
858837
* possible, remove EFI-related code altogether.

0 commit comments

Comments
 (0)