linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] three simple cleanups
@ 2021-09-08  8:57 Martin Kaiser
  2021-09-08  8:57 ` [PATCH 1/3] staging: r8188eu: remove unused function prototype Martin Kaiser
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Martin Kaiser @ 2021-09-08  8:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

Remove unused definitions and a pointless loop.

Martin Kaiser (3):
  staging: r8188eu: remove unused function prototype
  staging: r8188eu: remove unused define
  staging: r8188eu: this endless loop is executed only once

 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c  | 34 ++++++++-----------
 drivers/staging/r8188eu/include/rtw_io.h      |  2 --
 .../staging/r8188eu/os_dep/osdep_service.c    |  2 --
 3 files changed, 15 insertions(+), 23 deletions(-)

-- 
2.20.1


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

* [PATCH 1/3] staging: r8188eu: remove unused function prototype
  2021-09-08  8:57 [PATCH 0/3] three simple cleanups Martin Kaiser
@ 2021-09-08  8:57 ` Martin Kaiser
  2021-09-08  8:57 ` [PATCH 2/3] staging: r8188eu: remove unused define Martin Kaiser
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Kaiser @ 2021-09-08  8:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

There's no rtw_write_scsi function in this driver. Remove its prototype.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/include/rtw_io.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h
index 4b41c7b03972..263a37d49b6e 100644
--- a/drivers/staging/r8188eu/include/rtw_io.h
+++ b/drivers/staging/r8188eu/include/rtw_io.h
@@ -298,8 +298,6 @@ void _rtw_write_port_cancel(struct adapter *adapter);
 	_rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
 #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
 
-void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem);
-
 /* ioreq */
 void ioreq_read8(struct adapter *adapter, u32 addr, u8 *pval);
 void ioreq_read16(struct adapter *adapter, u32 addr, u16 *pval);
-- 
2.20.1


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

* [PATCH 2/3] staging: r8188eu: remove unused define
  2021-09-08  8:57 [PATCH 0/3] three simple cleanups Martin Kaiser
  2021-09-08  8:57 ` [PATCH 1/3] staging: r8188eu: remove unused function prototype Martin Kaiser
@ 2021-09-08  8:57 ` Martin Kaiser
  2021-09-08  8:57 ` [PATCH 3/3] staging: r8188eu: this endless loop is executed only once Martin Kaiser
  2021-09-08 15:52 ` [PATCH 0/3] three simple cleanups Michael Straube
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Kaiser @ 2021-09-08  8:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

The RTW_SUSPEND_LOCK_NAME define is not used. Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/os_dep/osdep_service.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
index 4328992907f2..cbe4f52c4a09 100644
--- a/drivers/staging/r8188eu/os_dep/osdep_service.c
+++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
@@ -97,8 +97,6 @@ void rtw_usleep_os(int us)
 		msleep((us / 1000) + 1);
 }
 
-#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
-
 static const struct device_type wlan_type = {
 	.name = "wlan",
 };
-- 
2.20.1


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

* [PATCH 3/3] staging: r8188eu: this endless loop is executed only once
  2021-09-08  8:57 [PATCH 0/3] three simple cleanups Martin Kaiser
  2021-09-08  8:57 ` [PATCH 1/3] staging: r8188eu: remove unused function prototype Martin Kaiser
  2021-09-08  8:57 ` [PATCH 2/3] staging: r8188eu: remove unused define Martin Kaiser
@ 2021-09-08  8:57 ` Martin Kaiser
  2021-09-08 15:52 ` [PATCH 0/3] three simple cleanups Michael Straube
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Kaiser @ 2021-09-08  8:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
	linux-kernel, Martin Kaiser

There's a funny "loop" in rtl8188eu_xmitframe_complete. It looks like

do {
  ... some commands...
  break;
} while (1);

Remove it.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 34 +++++++++-----------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
index 17be67ac5fae..3b870d0c72fd 100644
--- a/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_xmit.c
@@ -437,30 +437,26 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
 	}
 
 	/* 3 1. pick up first frame */
-	do {
-		rtw_free_xmitframe(pxmitpriv, pxmitframe);
-
-		pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
-		if (!pxmitframe) {
-			/*  no more xmit frame, release xmit buffer */
-			rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
-			return false;
-		}
+	rtw_free_xmitframe(pxmitpriv, pxmitframe);
 
-		pxmitframe->pxmitbuf = pxmitbuf;
-		pxmitframe->buf_addr = pxmitbuf->pbuf;
-		pxmitbuf->priv_data = pxmitframe;
+	pxmitframe = rtw_dequeue_xframe(pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry);
+	if (!pxmitframe) {
+		/*  no more xmit frame, release xmit buffer */
+		rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
+		return false;
+	}
 
-		pxmitframe->agg_num = 1; /*  alloc xmitframe should assign to 1. */
-		pxmitframe->pkt_offset = 1; /*  first frame of aggregation, reserve offset */
+	pxmitframe->pxmitbuf = pxmitbuf;
+	pxmitframe->buf_addr = pxmitbuf->pbuf;
+	pxmitbuf->priv_data = pxmitframe;
 
-		rtw_xmitframe_coalesce(adapt, pxmitframe->pkt, pxmitframe);
+	pxmitframe->agg_num = 1; /*  alloc xmitframe should assign to 1. */
+	pxmitframe->pkt_offset = 1; /*  first frame of aggregation, reserve offset */
 
-		/*  always return ndis_packet after rtw_xmitframe_coalesce */
-		rtw_os_xmit_complete(adapt, pxmitframe);
+	rtw_xmitframe_coalesce(adapt, pxmitframe->pkt, pxmitframe);
 
-		break;
-	} while (1);
+	/*  always return ndis_packet after rtw_xmitframe_coalesce */
+	rtw_os_xmit_complete(adapt, pxmitframe);
 
 	/* 3 2. aggregate same priority and same DA(AP or STA) frames */
 	pfirstframe = pxmitframe;
-- 
2.20.1


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

* Re: [PATCH 0/3] three simple cleanups
  2021-09-08  8:57 [PATCH 0/3] three simple cleanups Martin Kaiser
                   ` (2 preceding siblings ...)
  2021-09-08  8:57 ` [PATCH 3/3] staging: r8188eu: this endless loop is executed only once Martin Kaiser
@ 2021-09-08 15:52 ` Michael Straube
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Straube @ 2021-09-08 15:52 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, linux-staging, linux-kernel

On 9/8/21 10:57, Martin Kaiser wrote:
> Remove unused definitions and a pointless loop.
> 
> Martin Kaiser (3):
>    staging: r8188eu: remove unused function prototype
>    staging: r8188eu: remove unused define
>    staging: r8188eu: this endless loop is executed only once
> 
>   drivers/staging/r8188eu/hal/rtl8188eu_xmit.c  | 34 ++++++++-----------
>   drivers/staging/r8188eu/include/rtw_io.h      |  2 --
>   .../staging/r8188eu/os_dep/osdep_service.c    |  2 --
>   3 files changed, 15 insertions(+), 23 deletions(-)
> 

Builds and looks good to me.

For all 3 patches

Acked-by: Michael Straube <straube.linux@gmail.com>

Thanks,
Michael


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

end of thread, other threads:[~2021-09-08 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08  8:57 [PATCH 0/3] three simple cleanups Martin Kaiser
2021-09-08  8:57 ` [PATCH 1/3] staging: r8188eu: remove unused function prototype Martin Kaiser
2021-09-08  8:57 ` [PATCH 2/3] staging: r8188eu: remove unused define Martin Kaiser
2021-09-08  8:57 ` [PATCH 3/3] staging: r8188eu: this endless loop is executed only once Martin Kaiser
2021-09-08 15:52 ` [PATCH 0/3] three simple cleanups Michael Straube

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).