linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: r8188eu: Remove four unused semaphores
@ 2021-10-22 11:39 Fabio M. De Francesco
  2021-10-24 12:30 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio M. De Francesco @ 2021-10-22 11:39 UTC (permalink / raw)
  To: Larry Finger, Phillip Potter, Greg Kroah-Hartman, linux-staging,
	linux-kernel
  Cc: Fabio M. De Francesco

Remove four initialized but unused semaphores.

Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
 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(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index 51a13262a226..23f251827310 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -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);
diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c
index 0c033a077bf9..dbb5baa145c5 100644
--- a/drivers/staging/r8188eu/core/rtw_xmit.c
+++ b/drivers/staging/r8188eu/core/rtw_xmit.c
@@ -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;
diff --git a/drivers/staging/r8188eu/include/drv_types.h b/drivers/staging/r8188eu/include/drv_types.h
index 3e4928320f17..60140ae42dca 100644
--- a/drivers/staging/r8188eu/include/drv_types.h
+++ b/drivers/staging/r8188eu/include/drv_types.h
@@ -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;
diff --git a/drivers/staging/r8188eu/include/rtw_recv.h b/drivers/staging/r8188eu/include/rtw_recv.h
index 1e28ec731547..2557d0e9b3bd 100644
--- a/drivers/staging/r8188eu/include/rtw_recv.h
+++ b/drivers/staging/r8188eu/include/rtw_recv.h
@@ -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;
 
diff --git a/drivers/staging/r8188eu/include/rtw_xmit.h b/drivers/staging/r8188eu/include/rtw_xmit.h
index b2df1480d66b..156ec9cebad6 100644
--- a/drivers/staging/r8188eu/include/rtw_xmit.h
+++ b/drivers/staging/r8188eu/include/rtw_xmit.h
@@ -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 */
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 40f2481afc6f..7ed9f5f54472 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -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);
-- 
2.33.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: Remove four unused semaphores
  2021-10-22 11:39 [PATCH] staging: r8188eu: Remove four unused semaphores Fabio M. De Francesco
@ 2021-10-24 12:30 ` Greg Kroah-Hartman
  2021-10-24 16:27   ` Fabio M. De Francesco
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-10-24 12:30 UTC (permalink / raw)
  To: Fabio M. De Francesco
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On Fri, Oct 22, 2021 at 01:39:36PM +0200, Fabio M. De Francesco wrote:
> Remove four initialized but unused semaphores.
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>

What semaphores were removed?  Please be specific.

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

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging: r8188eu: Remove four unused semaphores
  2021-10-24 12:30 ` Greg Kroah-Hartman
@ 2021-10-24 16:27   ` Fabio M. De Francesco
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio M. De Francesco @ 2021-10-24 16:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On Sunday, October 24, 2021 2:30:11 PM CEST Greg Kroah-Hartman wrote:
> On Fri, Oct 22, 2021 at 01:39:36PM +0200, Fabio M. De Francesco wrote:
> > Remove four initialized but unused semaphores.
> > 
> > Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> 
> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-24 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 11:39 [PATCH] staging: r8188eu: Remove four unused semaphores Fabio M. De Francesco
2021-10-24 12:30 ` Greg Kroah-Hartman
2021-10-24 16:27   ` Fabio M. De Francesco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).