From aec747851b73828a84fc8d6a7c02743bbb51ffd9 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 22 Aug 2025 15:54:10 +0200 Subject: [PATCH] staging: rtl8723bs: merge rtw_os_recv_resource_alloc into rtw_recv.c Merge the functionality of rtw_os_recv_resource_alloc into _rtw_init_recv_priv to reduce code in the os_dep directory. Signed-off-by: Michael Straube Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20250822135418.118115-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++- drivers/staging/rtl8723bs/include/recv_osdep.h | 1 - drivers/staging/rtl8723bs/os_dep/recv_linux.c | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index 2b054525b3fda..fcc28d4556c53 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -66,7 +66,8 @@ signed int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *pada list_add_tail(&(precvframe->u.list), &(precvpriv->free_recv_queue.queue)); - rtw_os_recv_resource_alloc(padapter, precvframe); + precvframe->u.hdr.pkt_newalloc = NULL; + precvframe->u.hdr.pkt = NULL; precvframe->u.hdr.len = 0; diff --git a/drivers/staging/rtl8723bs/include/recv_osdep.h b/drivers/staging/rtl8723bs/include/recv_osdep.h index 51b52d6b03676..763ddef4ad90f 100644 --- a/drivers/staging/rtl8723bs/include/recv_osdep.h +++ b/drivers/staging/rtl8723bs/include/recv_osdep.h @@ -19,7 +19,6 @@ int rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter); void rtw_free_recv_priv(struct recv_priv *precvpriv); -void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe); void rtw_os_recv_resource_free(struct recv_priv *precvpriv); void rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *precvbuf); diff --git a/drivers/staging/rtl8723bs/os_dep/recv_linux.c b/drivers/staging/rtl8723bs/os_dep/recv_linux.c index c5819c3c59d8c..ccd00f8bee7e5 100644 --- a/drivers/staging/rtl8723bs/os_dep/recv_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/recv_linux.c @@ -9,12 +9,6 @@ #include #include -/* alloc os related resource in union recv_frame */ -void rtw_os_recv_resource_alloc(struct adapter *padapter, union recv_frame *precvframe) -{ - precvframe->u.hdr.pkt_newalloc = precvframe->u.hdr.pkt = NULL; -} - /* free os related resource in union recv_frame */ void rtw_os_recv_resource_free(struct recv_priv *precvpriv) { -- 2.47.3