]> git.baikalelectronics.ru Git - kernel.git/commit
staging: r8188eu: convert all rtw_zvmalloc calls to vzalloc calls
authorPhillip Potter <phil@philpotter.co.uk>
Wed, 18 Aug 2021 23:48:50 +0000 (00:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Aug 2021 05:42:57 +0000 (07:42 +0200)
commite2df57f8df600b486f37bad7063b596cb3a67f13
treeec51af066304347c23d637ff06bcf91cf5495915
parent6881933c9a20c3180dd8973d1d66d0fb0eb2c9b7
staging: r8188eu: convert all rtw_zvmalloc calls to vzalloc calls

Convert all rtw_zvmalloc calls within the driver to use the existing
kernel vzalloc function, which has the same semantics. Also rewrite the
two places where it is mentioned in comments to say vzalloc, and remove
the redundant cast to struct adapter * in ./os_dep/usb_intf.c as vzalloc
returns void *.

The reason for the conversion is that rtw_zvmalloc is just a
preprocessor definition for _rtw_zvmalloc which itself is just an inline
wrapper around vmalloc which then zeroes the memory out. As vzalloc does
the same thing via usage of __GFP_ZERO, this code is redundant and can
subsequently be removed.

Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210818234853.208448-5-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme.c
drivers/staging/r8188eu/core/rtw_mp.c
drivers/staging/r8188eu/core/rtw_recv.c
drivers/staging/r8188eu/core/rtw_sta_mgt.c
drivers/staging/r8188eu/core/rtw_xmit.c
drivers/staging/r8188eu/hal/odm_interface.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/os_dep/osdep_service.c
drivers/staging/r8188eu/os_dep/usb_intf.c