From ac1790da7c44b7964324ea813de29553f0c198e3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 30 Jul 2021 11:24:12 +0200 Subject: [PATCH] remove rtw_mfree2d() function It is just a wrapper around kfree(), so remove it and just call kfree() instead. Adaptation of: https://lore.kernel.org/r/20210730092417.1014392-7-gregkh@linuxfoundation.org --- hal/rtl8192e/rtl8192e_hal_init.c | 5 ++--- include/osdep_service.h | 1 - os_dep/osdep_service.c | 5 ----- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/hal/rtl8192e/rtl8192e_hal_init.c b/hal/rtl8192e/rtl8192e_hal_init.c index 8705aec..d8e756d 100644 --- a/hal/rtl8192e/rtl8192e_hal_init.c +++ b/hal/rtl8192e/rtl8192e_hal_init.c @@ -1178,7 +1178,7 @@ Hal_EfusePowerSwitch8192E( if (bWrite == _TRUE) { /* Enable LDO 2.5V before read/write action */ tempval = rtw_read8(pAdapter, EFUSE_TEST + 3); - tempval &= 0x07; /* 0x34[30:27] = 4¡¦1110 => LDOE25 voltage select to 2.25V Suggested by SD1 Jackie & DD -Tm_lin */ + tempval &= 0x07; /* 0x34[30:27] = 4��1110 => LDOE25 voltage select to 2.25V Suggested by SD1 Jackie & DD -Tm_lin */ /* tempval |= (VOLTAGE_V25 << 4); */ tempval |= 0x70; rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval | 0x80)); @@ -1429,8 +1429,7 @@ exit: if (efuseTbl) rtw_mfree(efuseTbl, EFUSE_MAP_LEN_8192E); - if (eFuseWord) - rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_8192E, EFUSE_MAX_WORD_UNIT, sizeof(u16)); + kfree(eFuseWord); } static VOID diff --git a/include/osdep_service.h b/include/osdep_service.h index 7d13e01..16a7e75 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -288,7 +288,6 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a #endif /* DBG_MEM_ALLOC */ extern void *rtw_malloc2d(int h, int w, size_t size); -extern void rtw_mfree2d(void *pbuf, int h, int w, int size); void rtw_os_pkt_free(_pkt *pkt); _pkt *rtw_os_pkt_copy(_pkt *pkt); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index df1697c..7794059 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -873,11 +873,6 @@ void *rtw_malloc2d(int h, int w, size_t size) return a; } -void rtw_mfree2d(void *pbuf, int h, int w, int size) -{ - rtw_mfree((u8 *)pbuf, h * sizeof(void *) + w * h * size); -} - inline void rtw_os_pkt_free(_pkt *pkt) { #if defined(PLATFORM_LINUX)