mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] staging: r8188eu: clean up usb transfers
@ 2023-01-24 21:01 Martin Kaiser
  2023-01-24 21:01 ` [PATCH 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter Martin Kaiser
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Martin Kaiser @ 2023-01-24 21:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel, Martin Kaiser

This series cleans up some defines related to usb transfers. It's based on
the series I sent yesterday.

Martin Kaiser (4):
  staging: r8188eu: usb_read_port_complete needs no regs parameter
  staging: r8188eu: remove defines that strip regs parameter
  staging: r8188eu: remove unused defines
  staging: r8188eu: remove usb_ops_linux.h

 drivers/staging/r8188eu/hal/usb_ops_linux.c   |  6 ++++-
 drivers/staging/r8188eu/include/usb_ops.h     |  2 --
 .../staging/r8188eu/include/usb_ops_linux.h   | 27 -------------------
 .../staging/r8188eu/os_dep/usb_ops_linux.c    |  1 -
 4 files changed, 5 insertions(+), 31 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/include/usb_ops_linux.h

-- 
2.30.2


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

* [PATCH 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter
  2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
@ 2023-01-24 21:01 ` Martin Kaiser
  2023-01-24 21:01 ` [PATCH 2/4] staging: r8188eu: remove defines that strip " Martin Kaiser
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Kaiser @ 2023-01-24 21:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel, Martin Kaiser

Remove the regs parameter from usb_read_port_complete, it is not used.

Without the regs parameter, there's no need for the define that makes
usb_read_port_complete usable as urb callback function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/usb_ops_linux.c     | 2 +-
 drivers/staging/r8188eu/include/usb_ops_linux.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index e122c8ca929c..0f789d5250db 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -344,7 +344,7 @@ void rtl8188eu_recv_tasklet(unsigned long priv)
 	}
 }
 
-static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
+static void usb_read_port_complete(struct urb *purb)
 {
 	struct recv_buf	*precvbuf = (struct recv_buf *)purb->context;
 	struct adapter	*adapt = (struct adapter *)precvbuf->adapter;
diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/staging/r8188eu/include/usb_ops_linux.h
index e406a1fccda7..0a8fefbd4c2e 100644
--- a/drivers/staging/r8188eu/include/usb_ops_linux.h
+++ b/drivers/staging/r8188eu/include/usb_ops_linux.h
@@ -19,8 +19,6 @@
 	usb_bulkout_zero_complete(purb)
 #define usb_write_mem_complete(purb, regs)		\
 	usb_write_mem_complete(purb)
-#define usb_read_port_complete(purb, regs)		\
-	usb_read_port_complete(purb)
 #define usb_read_interrupt_complete(purb, regs)		\
 	usb_read_interrupt_complete(purb)
 
-- 
2.30.2


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

* [PATCH 2/4] staging: r8188eu: remove defines that strip regs parameter
  2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
  2023-01-24 21:01 ` [PATCH 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter Martin Kaiser
@ 2023-01-24 21:01 ` Martin Kaiser
  2023-01-24 21:01 ` [PATCH 3/4] staging: r8188eu: remove unused defines Martin Kaiser
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Kaiser @ 2023-01-24 21:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel, Martin Kaiser

usb_ops_linux.h has a number of defines that strip the regs parameter from
function that should be used as urb callbacks.

Remove the defines for functions that don't exist in the r8188eu driver.

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

diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/staging/r8188eu/include/usb_ops_linux.h
index 0a8fefbd4c2e..c7a0dc482761 100644
--- a/drivers/staging/r8188eu/include/usb_ops_linux.h
+++ b/drivers/staging/r8188eu/include/usb_ops_linux.h
@@ -13,13 +13,4 @@
 
 #define RTW_USB_BULKOUT_TIME	5000/* ms */
 
-#define _usbctrl_vendorreq_async_callback(urb, regs)	\
-	_usbctrl_vendorreq_async_callback(urb)
-#define usb_bulkout_zero_complete(purb, regs)		\
-	usb_bulkout_zero_complete(purb)
-#define usb_write_mem_complete(purb, regs)		\
-	usb_write_mem_complete(purb)
-#define usb_read_interrupt_complete(purb, regs)		\
-	usb_read_interrupt_complete(purb)
-
 #endif
-- 
2.30.2


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

* [PATCH 3/4] staging: r8188eu: remove unused defines
  2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
  2023-01-24 21:01 ` [PATCH 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter Martin Kaiser
  2023-01-24 21:01 ` [PATCH 2/4] staging: r8188eu: remove defines that strip " Martin Kaiser
@ 2023-01-24 21:01 ` Martin Kaiser
  2023-01-24 21:01 ` [PATCH 4/4] staging: r8188eu: remove usb_ops_linux.h Martin Kaiser
  2023-01-25 18:56 ` [PATCH 0/4] staging: r8188eu: clean up usb transfers Philipp Hortmann
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Kaiser @ 2023-01-24 21:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel, Martin Kaiser

Remove some unused defines from usb_ops_linux.h.

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

diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/staging/r8188eu/include/usb_ops_linux.h
index c7a0dc482761..b149df7957dd 100644
--- a/drivers/staging/r8188eu/include/usb_ops_linux.h
+++ b/drivers/staging/r8188eu/include/usb_ops_linux.h
@@ -6,11 +6,6 @@
 
 #define VENDOR_CMD_MAX_DATA_LEN	254
 
-#define RTW_USB_CONTROL_MSG_TIMEOUT_TEST	10/* ms */
 #define RTW_USB_CONTROL_MSG_TIMEOUT	500/* ms */
 
-#define MAX_USBCTRL_VENDORREQ_TIMES	10
-
-#define RTW_USB_BULKOUT_TIME	5000/* ms */
-
 #endif
-- 
2.30.2


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

* [PATCH 4/4] staging: r8188eu: remove usb_ops_linux.h
  2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
                   ` (2 preceding siblings ...)
  2023-01-24 21:01 ` [PATCH 3/4] staging: r8188eu: remove unused defines Martin Kaiser
@ 2023-01-24 21:01 ` Martin Kaiser
  2023-01-25 18:56 ` [PATCH 0/4] staging: r8188eu: clean up usb transfers Philipp Hortmann
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Kaiser @ 2023-01-24 21:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel, Martin Kaiser

There's only two defines left in usb_ops_linux.h. Move those defines to
usb_ops_linux.c, where they are used.

Remove the now empty file usb_ops_linux.h.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/usb_ops_linux.c     |  4 ++++
 drivers/staging/r8188eu/include/usb_ops.h       |  2 --
 drivers/staging/r8188eu/include/usb_ops_linux.h | 11 -----------
 drivers/staging/r8188eu/os_dep/usb_ops_linux.c  |  1 -
 4 files changed, 4 insertions(+), 14 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/include/usb_ops_linux.h

diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index 0f789d5250db..9c940ab8fd41 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -7,6 +7,10 @@
 #include "../include/usb_ops.h"
 #include "../include/rtl8188e_hal.h"
 
+#define VENDOR_CMD_MAX_DATA_LEN	254
+
+#define RTW_USB_CONTROL_MSG_TIMEOUT	500/* ms */
+
 static int usb_read(struct adapter *adapt, u16 value, void *data, u8 size)
 {
 	struct dvobj_priv *dvobjpriv = adapter_to_dvobj(adapt);
diff --git a/drivers/staging/r8188eu/include/usb_ops.h b/drivers/staging/r8188eu/include/usb_ops.h
index ddc46cb44358..5bd8ce37aebf 100644
--- a/drivers/staging/r8188eu/include/usb_ops.h
+++ b/drivers/staging/r8188eu/include/usb_ops.h
@@ -17,8 +17,6 @@
 #define MAX_VENDOR_REQ_CMD_SIZE	254	/* 8188cu SIE Support */
 #define MAX_USB_IO_CTL_SIZE	(MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
 
-#include "usb_ops_linux.h"
-
 /*
  * Increase and check if the continual_urb_error of this @param dvobjprivei
  * is larger than MAX_CONTINUAL_URB_ERR
diff --git a/drivers/staging/r8188eu/include/usb_ops_linux.h b/drivers/staging/r8188eu/include/usb_ops_linux.h
deleted file mode 100644
index b149df7957dd..000000000000
--- a/drivers/staging/r8188eu/include/usb_ops_linux.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __USB_OPS_LINUX_H__
-#define __USB_OPS_LINUX_H__
-
-#define VENDOR_CMD_MAX_DATA_LEN	254
-
-#define RTW_USB_CONTROL_MSG_TIMEOUT	500/* ms */
-
-#endif
diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
index 583533631133..c9ee1173a1d6 100644
--- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
@@ -4,7 +4,6 @@
 #define _USB_OPS_LINUX_C_
 
 #include "../include/drv_types.h"
-#include "../include/usb_ops_linux.h"
 #include "../include/rtl8188e_recv.h"
 
 static unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)
-- 
2.30.2


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

* Re: [PATCH 0/4] staging: r8188eu: clean up usb transfers
  2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
                   ` (3 preceding siblings ...)
  2023-01-24 21:01 ` [PATCH 4/4] staging: r8188eu: remove usb_ops_linux.h Martin Kaiser
@ 2023-01-25 18:56 ` Philipp Hortmann
  4 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2023-01-25 18:56 UTC (permalink / raw)
  To: Martin Kaiser, Greg Kroah-Hartman
  Cc: Larry Finger, Phillip Potter, Michael Straube, Pavel Skripkin,
	linux-staging, linux-kernel

On 1/24/23 22:01, Martin Kaiser wrote:
> This series cleans up some defines related to usb transfers. It's based on
> the series I sent yesterday.
> 
> Martin Kaiser (4):
>    staging: r8188eu: usb_read_port_complete needs no regs parameter
>    staging: r8188eu: remove defines that strip regs parameter
>    staging: r8188eu: remove unused defines
>    staging: r8188eu: remove usb_ops_linux.h
> 
>   drivers/staging/r8188eu/hal/usb_ops_linux.c   |  6 ++++-
>   drivers/staging/r8188eu/include/usb_ops.h     |  2 --
>   .../staging/r8188eu/include/usb_ops_linux.h   | 27 -------------------
>   .../staging/r8188eu/os_dep/usb_ops_linux.c    |  1 -
>   4 files changed, 5 insertions(+), 31 deletions(-)
>   delete mode 100644 drivers/staging/r8188eu/include/usb_ops_linux.h
> 

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

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

end of thread, other threads:[~2023-01-25 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 21:01 [PATCH 0/4] staging: r8188eu: clean up usb transfers Martin Kaiser
2023-01-24 21:01 ` [PATCH 1/4] staging: r8188eu: usb_read_port_complete needs no regs parameter Martin Kaiser
2023-01-24 21:01 ` [PATCH 2/4] staging: r8188eu: remove defines that strip " Martin Kaiser
2023-01-24 21:01 ` [PATCH 3/4] staging: r8188eu: remove unused defines Martin Kaiser
2023-01-24 21:01 ` [PATCH 4/4] staging: r8188eu: remove usb_ops_linux.h Martin Kaiser
2023-01-25 18:56 ` [PATCH 0/4] staging: r8188eu: clean up usb transfers Philipp Hortmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®