Skip to content

Commit 0dced5c

Browse files
Jminugregkh
authored andcommitted
staging: rtl8723bs: remove unused allocation wrapper functions
Remove the custom memory allocation wrapper functions and macros from osdep_service.c and osdep_service.h as they are no longer used. Signed-off-by: Minu Jin <s9430939@naver.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260204131347.3515949-6-s9430939@naver.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9fe6f14 commit 0dced5c

2 files changed

Lines changed: 0 additions & 36 deletions

File tree

drivers/staging/rtl8723bs/include/osdep_service.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,10 @@
5454

5555
extern int RTW_STATUS_CODE(int error_code);
5656

57-
void *_rtw_zmalloc(u32 sz);
58-
void *_rtw_malloc(u32 sz);
5957
void _kfree(u8 *pbuf, u32 sz);
6058

61-
struct sk_buff *_rtw_skb_alloc(u32 sz);
62-
struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb);
6359
int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb);
6460

65-
#define rtw_malloc(sz) _rtw_malloc((sz))
66-
#define rtw_zmalloc(sz) _rtw_zmalloc((sz))
67-
68-
#define rtw_skb_alloc(size) _rtw_skb_alloc((size))
69-
#define rtw_skb_alloc_f(size, mstat_f) _rtw_skb_alloc((size))
70-
#define rtw_skb_copy(skb) _rtw_skb_copy((skb))
71-
#define rtw_skb_copy_f(skb, mstat_f) _rtw_skb_copy((skb))
7261
#define rtw_netif_rx(ndev, skb) _rtw_netif_rx(ndev, skb)
7362

7463
extern void _rtw_init_queue(struct __queue *pqueue);

drivers/staging/rtl8723bs/os_dep/osdep_service.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,6 @@ inline int RTW_STATUS_CODE(int error_code)
1414
return _FAIL;
1515
}
1616

17-
void *_rtw_malloc(u32 sz)
18-
{
19-
return kmalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
20-
}
21-
22-
void *_rtw_zmalloc(u32 sz)
23-
{
24-
void *pbuf = _rtw_malloc(sz);
25-
26-
if (pbuf)
27-
memset(pbuf, 0, sz);
28-
29-
return pbuf;
30-
}
31-
32-
inline struct sk_buff *_rtw_skb_alloc(u32 sz)
33-
{
34-
return __dev_alloc_skb(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
35-
}
36-
37-
inline struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb)
38-
{
39-
return skb_copy(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
40-
}
41-
4217
inline int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb)
4318
{
4419
skb->dev = ndev;

0 commit comments

Comments
 (0)