Skip to contentSkip to conversation

staging: r8188eu: Remove four unused semaphores

PATCH In review Fabio M. De Francesco 2 participants 3 messages Oct 22, 2021 – Oct 24, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: r8188eu: Remove four unused semaphores

Remove four initialized but unused semaphores.

---
 drivers/staging/r8188eu/core/rtw_recv.c     | 2 --
 drivers/staging/r8188eu/core/rtw_xmit.c     | 3 ---
 drivers/staging/r8188eu/include/drv_types.h | 1 -
 drivers/staging/r8188eu/include/rtw_recv.h  | 1 -
 drivers/staging/r8188eu/include/rtw_xmit.h  | 2 --
 drivers/staging/r8188eu/os_dep/usb_intf.c   | 1 -
 6 files changed, 10 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +0 -2
index 51a13262a226..23f251827310 100644
@@ -81,8 +81,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
 	}
 	precvpriv->rx_pending_cnt = 1;
 
-	sema_init(&precvpriv->allrxreturnevt, 0);
-
 	res = rtl8188eu_init_recv_priv(padapter);
 
 	timer_setup(&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl, 0);
drivers/staging/r8188eu/core/rtw_xmit.c +0 -3
index 0c033a077bf9..dbb5baa145c5 100644
@@ -49,7 +49,6 @@ s32	_rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 	/*  We don't need to memset padapter->XXX to zero, because adapter is allocated by vzalloc(). */
 
 	spin_lock_init(&pxmitpriv->lock);
-	sema_init(&pxmitpriv->terminate_xmitthread_sema, 0);
 
 	/*
 	Please insert all the queue initializaiton using rtw_init_queue below
@@ -187,8 +186,6 @@ s32	_rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 
 	pxmitpriv->txirp_cnt = 1;
 
-	sema_init(&pxmitpriv->tx_retevt, 0);
-
 	/* per AC pending irp */
 	pxmitpriv->beq_cnt = 0;
 	pxmitpriv->bkq_cnt = 0;
drivers/staging/r8188eu/include/drv_types.h +0 -1
index 3e4928320f17..60140ae42dca 100644
@@ -152,7 +152,6 @@ struct dvobj_priv {
 	u8	RtNumOutPipes;
 	int	ep_num[5]; /* endpoint number */
 	int	RegUsbSS;
-	struct semaphore usb_suspend_sema;
 	struct mutex  usb_vendor_req_mutex;
 
 	struct usb_interface *pusbintf;
drivers/staging/r8188eu/include/rtw_recv.h +0 -1
index 1e28ec731547..2557d0e9b3bd 100644
@@ -176,7 +176,6 @@ struct recv_priv {
 	uint  rx_largepacket_crcerr;
 	uint  rx_smallpacket_crcerr;
 	uint  rx_middlepacket_crcerr;
-	struct semaphore allrxreturnevt;
 	uint	ff_hwaddr;
 	u8	rx_pending_cnt;
 
drivers/staging/r8188eu/include/rtw_xmit.h +0 -2
index b2df1480d66b..156ec9cebad6 100644
@@ -256,7 +256,6 @@ struct agg_pkt_info {
 
 struct	xmit_priv {
 	spinlock_t lock;
-	struct semaphore terminate_xmitthread_sema;
 	struct __queue be_pending;
 	struct __queue bk_pending;
 	struct __queue vi_pending;
@@ -281,7 +280,6 @@ struct	xmit_priv {
 	u8	wmm_para_seq[4];/* sequence for wmm ac parameter strength
 				 * from large to small. it's value is 0->vo,
 				 * 1->vi, 2->be, 3->bk. */
-	struct semaphore tx_retevt;/* all tx return event; */
 	u8		txirp_cnt;/*  */
 	struct tasklet_struct xmit_tasklet;
 	/* per AC pending irp */
drivers/staging/r8188eu/os_dep/usb_intf.c +0 -1
index 40f2481afc6f..7ed9f5f54472 100644
@@ -129,7 +129,6 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
 	}
 
 	/* 3 misc */
-	sema_init(&pdvobjpriv->usb_suspend_sema, 0);
 	rtw_reset_continual_urb_error(pdvobjpriv);
 
 	usb_get_dev(pusbd);
Signature · 1 line
2.33.1
#2 lore raw
Quoted 5 lines · CEST Greg Kroah-Hartman
Quoted 3 lines · Fabio M. De Francesco

Remove four initialized but unused semaphores.

Quoted 8 lines

What semaphores were removed? Please be specific.

And can this be broken up into "one removal per patch?"

thanks,

greg k-h

Hi Greg,

With all due respect (I mean it), I must say that I'm not going to split this trivial work into four patches of two lines each.

I understand that here you have the last word. After all, yours the tree, yours the rules.

However, I'm used to do only what I can understand. After noticing that you can take in one shot the removal of 7000 unnecessary lines (e.g., please see commit 7bdedfef085b), I really cannot understand why you cannot take also the removal of four initialised but unused variables in one only go.

I'm really sorry but, if you cannot reconsider your decision, please drop this patch. I'm pretty sure that someone else is willing to do what you required, but not me.

Best regards,

Fabio