[PATCH] RAS/CEC: remove unused del_lru_elem()

From: Miaohe Lin
Date: Sat Jun 03 2023 - 02:38:50 EST


The function del_lru_elem() is not used. Remove it.

Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
---
drivers/ras/cec.c | 19 -------------------
1 file changed, 19 deletions(-)

diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
index 321af498ee11..fa2fa596219c 100644
--- a/drivers/ras/cec.c
+++ b/drivers/ras/cec.c
@@ -261,25 +261,6 @@ static u64 del_lru_elem_unlocked(struct ce_array *ca)
return PFN(ca->array[min_idx]);
}

-/*
- * We return the 0th pfn in the error case under the assumption that it cannot
- * be poisoned and excessive CEs in there are a serious deal anyway.
- */
-static u64 __maybe_unused del_lru_elem(void)
-{
- struct ce_array *ca = &ce_arr;
- u64 pfn;
-
- if (!ca->n)
- return 0;
-
- mutex_lock(&ce_mutex);
- pfn = del_lru_elem_unlocked(ca);
- mutex_unlock(&ce_mutex);
-
- return pfn;
-}
-
static bool sanity_check(struct ce_array *ca)
{
bool ret = false;
--
2.27.0