Skip to contentSkip to conversation

staging: rtl8723bs: declare private function as static

PATCH In review Kenneth Hsu 2 participants 2 messages Apr 23, 2017 – Apr 30, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: declare private function as static

This fixes a sparse warning regarding an undeclared symbol. Since the function is private to rtw_recv.c, it should be declared as static.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +2 -1
index 74e11948c015..695a5c958c80 100644
@@ -1717,7 +1717,8 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
 }
 
 /* perform defrag */
-union recv_frame *recvframe_defrag(struct adapter *adapter, struct __queue *defrag_q)
+static union recv_frame *recvframe_defrag(struct adapter *adapter,
+					  struct __queue *defrag_q)
 {
 	struct list_head	 *plist, *phead;
 	u8 *data, wlanhdr_offset;
Signature · 1 line
2.12.2
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Kenneth Hsu

This fixes a sparse warning regarding an undeclared symbol. Since the function is private to rtw_recv.c, it should be declared as static.

Looks good to me:

Regards,

Hans

Quoted 19 lines
---
  drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +2 -1
index 74e11948c015..695a5c958c80 100644
@@ -1717,7 +1717,8 @@ sint wlanhdr_to_ethhdr(union recv_frame *precvframe)
  }
 
  /* perform defrag */
-union recv_frame *recvframe_defrag(struct adapter *adapter, struct __queue *defrag_q)
+static union recv_frame *recvframe_defrag(struct adapter *adapter,
+					  struct __queue *defrag_q)
  {
  	struct list_head	 *plist, *phead;
  	u8 *data, wlanhdr_offset;