diff options
author | Bhaskar Singh <bhaskar.kernel@gmail.com> | 2018-08-21 06:32:22 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-27 19:29:39 +0200 |
commit | 22d8eeb32abcf4323757e6044497a2fdd560c0af (patch) | |
tree | 7651dd8c96f00f9d57e8bed4a56e4e685eb4b498 /drivers/staging/rtl8188eu/core/rtw_efuse.c | |
parent | 6c352cfd12f40e95635e8f6b6be53f1f958e7f86 (diff) |
staging: rtl8188eu: Removed a function and coded inline
This patch removed function named rtw_malloc2d.
I removed this function because this function is used exactly once and
function call have some overhead also.
Maybe this will improve code runtime slightly.
Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_efuse.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_efuse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 0fd306a808c4..ddd7f67fe5a2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -86,16 +86,20 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf) u16 **eFuseWord = NULL; u16 efuse_utilized = 0; u8 u1temp = 0; + void **tmp = NULL; efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL); if (!efuseTbl) return; - eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16)); - if (!eFuseWord) { + tmp = kzalloc(EFUSE_MAX_SECTION_88E * (sizeof(void *) + EFUSE_MAX_WORD_UNIT * sizeof(u16)), GFP_KERNEL); + if (!tmp) { DBG_88E("%s: alloc eFuseWord fail!\n", __func__); goto eFuseWord_failed; } + for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) + tmp[i] = ((char *)(tmp + EFUSE_MAX_SECTION_88E)) + i * EFUSE_MAX_WORD_UNIT * sizeof(u16); + eFuseWord = (u16 **)tmp; /* 0. Refresh efuse init map as all oxFF. */ for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) |