Skip to contentSkip to conversation

efi: Drop unused efi_range_is_wc() function

PATCH In review Ard Biesheuvel 2 participants 2 messages Mar 9 – Mar 11 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: Drop unused efi_range_is_wc() function

From: Ard Biesheuvel <[email protected]>

efi_range_is_wc() has no callers, so remove it.

---
 include/linux/efi.h | 21 ---------------------
 1 file changed, 21 deletions(-)
include/linux/efi.h +0 -21
index 664898d09ff5..72e76ec54641 100644
@@ -832,27 +832,6 @@ extern int __init parse_efi_signature_list(
 	const void *data, size_t size,
 	efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *));
 
-/**
- * efi_range_is_wc - check the WC bit on an address range
- * @start: starting kvirt address
- * @len: length of range
- *
- * Consult the EFI memory map and make sure it's ok to set this range WC.
- * Returns true or false.
- */
-static inline int efi_range_is_wc(unsigned long start, unsigned long len)
-{
-	unsigned long i;
-
-	for (i = 0; i < len; i += (1UL << EFI_PAGE_SHIFT)) {
-		unsigned long paddr = __pa(start + i);
-		if (!(efi_mem_attributes(paddr) & EFI_MEMORY_WC))
-			return 0;
-	}
-	/* The range checked out */
-	return 1;
-}
-
 /*
  * We play games with efi_enabled so that the compiler will, if
  * possible, remove EFI-related code altogether.
Signature · 1 line
2.53.0.473.g4a7958ca14-goog
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Ard Biesheuvel

From: Ard Biesheuvel <[email protected]>

efi_range_is_wc() has no callers, so remove it.

---

Quoted 39 lines
 include/linux/efi.h | 21 ---------------------
 1 file changed, 21 deletions(-)
include/linux/efi.h +0 -22
index 664898d09ff5..72e76ec54641 100644
@@ -832,27 +832,6 @@ extern int __init parse_efi_signature_list(
        const void *data, size_t size,
        efi_element_handler_t (*get_handler_for_guid)(const efi_guid_t *));
 
-/**
- * efi_range_is_wc - check the WC bit on an address range
- * @start: starting kvirt address
- * @len: length of range
- *
- * Consult the EFI memory map and make sure it's ok to set this range WC.
- * Returns true or false.
- */
-static inline int efi_range_is_wc(unsigned long start, unsigned long len)
-{
-       unsigned long i;
-
-       for (i = 0; i < len; i += (1UL << EFI_PAGE_SHIFT)) {
-               unsigned long paddr = __pa(start + i);
-               if (!(efi_mem_attributes(paddr) & EFI_MEMORY_WC))
-                       return 0;
-       }
-       /* The range checked out */
-       return 1;
-}
-
 /*
  * We play games with efi_enabled so that the compiler will, if
  * possible, remove EFI-related code altogether.
--

2.53.0.473.g4a7958ca14-goog