2023-01-11 20:45:33

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 00/20] staging: r8188eu: io cleanup

Clean up structs and function prototypes related to hardware access.

There's a number of definitions which are not used for usb devices such as
the r8188eu.

As usual, this is based on all the previous patches I sent. (I promise to
send no more patches until the pending ones are merged ;-)

Martin Kaiser (20):
staging: r8188eu: remove struct io_priv
staging: r8188eu: remove io function prototypes
staging: r8188eu: remove ioreq function prototypes
staging: r8188eu: remove async read function prototypes
staging: r8188eu: remove async write function prototypes
staging: r8188eu: remove struct io_queue
staging: r8188eu: remove attrib function prototypes
staging: r8188eu: remove rtw_write_scsi function prototype
staging: r8188eu: remove dev_power_down function prototype
staging: r8188eu: remove struct reg_protocol_rd
staging: r8188eu: remove struct reg_protocol_wt
staging: r8188eu: remove interface handler prototypes
staging: r8188eu: remove readmem and writemem prototypes
staging: r8188eu: remove IO defines
staging: r8188eu: remove struct io_req
staging: r8188eu: remove usb buffer macros
staging: r8188eu: pass struct adapter to usb_read
staging: r8188eu: pass struct adapter to usb_write
staging: r8188eu: remove struct intf_hdl
staging: r8188eu: remove struct intf_priv

drivers/staging/r8188eu/hal/usb_ops_linux.c | 34 +--
drivers/staging/r8188eu/include/drv_types.h | 1 -
drivers/staging/r8188eu/include/osdep_intf.h | 32 ---
drivers/staging/r8188eu/include/rtw_io.h | 255 -------------------
drivers/staging/r8188eu/os_dep/usb_intf.c | 9 -
5 files changed, 9 insertions(+), 322 deletions(-)

--
2.30.2


2023-01-11 20:46:28

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 06/20] staging: r8188eu: remove struct io_queue

struct io_queue is not used in the r8188eu driver. Remove it.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtw_io.h | 16 ----------------
1 file changed, 16 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h
index 6ce099e91e20..7d1f3cc20b57 100644
--- a/drivers/staging/r8188eu/include/rtw_io.h
+++ b/drivers/staging/r8188eu/include/rtw_io.h
@@ -82,7 +82,6 @@

struct intf_priv;
struct intf_hdl;
-struct io_queue;

struct io_req {
struct list_head list;
@@ -188,21 +187,6 @@ struct reg_protocol_wt {
#endif
};

-/*
-Below is the data structure used by _io_handler
-*/
-
-struct io_queue {
- spinlock_t lock;
- struct list_head free_ioreqs;
- struct list_head pending; /* The io_req list that will be served
- * in the single protocol read/write.*/
- struct list_head processing;
- u8 *free_ioreqs_buf; /* 4-byte aligned */
- u8 *pallocated_free_ioreqs_buf;
- struct intf_hdl intf;
-};
-
uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
void unregister_intf_hdl(struct intf_hdl *pintfhdl);

--
2.30.2

2023-01-11 20:49:05

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 07/20] staging: r8188eu: remove attrib function prototypes

Remove the prototypes for attrib read and write functions which are not
present in the r8188eu driver.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtw_io.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h
index 7d1f3cc20b57..9cf4f233ae60 100644
--- a/drivers/staging/r8188eu/include/rtw_io.h
+++ b/drivers/staging/r8188eu/include/rtw_io.h
@@ -190,9 +190,6 @@ struct reg_protocol_wt {
uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
void unregister_intf_hdl(struct intf_hdl *pintfhdl);

-void _rtw_attrib_read(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-void _rtw_attrib_write(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
int __must_check rtw_read8(struct adapter *adapter, u32 addr, u8 *data);
int __must_check rtw_read16(struct adapter *adapter, u32 addr, u16 *data);
int __must_check rtw_read32(struct adapter *adapter, u32 addr, u32 *data);
--
2.30.2

2023-01-11 20:49:16

by Martin Kaiser

[permalink] [raw]
Subject: [PATCH 03/20] staging: r8188eu: remove ioreq function prototypes

Remove some prototypes for ioreq functions which are not present in the
r8188eu driver.

Signed-off-by: Martin Kaiser <[email protected]>
---
drivers/staging/r8188eu/include/rtw_io.h | 8 --------
1 file changed, 8 deletions(-)

diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h
index 18e95bccda49..1d65c60cbe27 100644
--- a/drivers/staging/r8188eu/include/rtw_io.h
+++ b/drivers/staging/r8188eu/include/rtw_io.h
@@ -227,14 +227,6 @@ void rtw_write_port_cancel(struct adapter *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);
-void ioreq_read32(struct adapter *adapter, u32 addr, u32 *pval);
-void ioreq_write8(struct adapter *adapter, u32 addr, u8 val);
-void ioreq_write16(struct adapter *adapter, u32 addr, u16 val);
-void ioreq_write32(struct adapter *adapter, u32 addr, u32 val);
-
uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff,
void (*_async_io_callback)(struct adapter *padater,
struct io_req *pio_req,
--
2.30.2

2023-01-11 22:35:24

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH 00/20] staging: r8188eu: io cleanup

On 1/11/23 20:56, Martin Kaiser wrote:
> Clean up structs and function prototypes related to hardware access.
>
> There's a number of definitions which are not used for usb devices such as
> the r8188eu.
>
> As usual, this is based on all the previous patches I sent. (I promise to
> send no more patches until the pending ones are merged ;-)
>
> Martin Kaiser (20):
> staging: r8188eu: remove struct io_priv
> staging: r8188eu: remove io function prototypes
> staging: r8188eu: remove ioreq function prototypes
> staging: r8188eu: remove async read function prototypes
> staging: r8188eu: remove async write function prototypes
> staging: r8188eu: remove struct io_queue
> staging: r8188eu: remove attrib function prototypes
> staging: r8188eu: remove rtw_write_scsi function prototype
> staging: r8188eu: remove dev_power_down function prototype
> staging: r8188eu: remove struct reg_protocol_rd
> staging: r8188eu: remove struct reg_protocol_wt
> staging: r8188eu: remove interface handler prototypes
> staging: r8188eu: remove readmem and writemem prototypes
> staging: r8188eu: remove IO defines
> staging: r8188eu: remove struct io_req
> staging: r8188eu: remove usb buffer macros
> staging: r8188eu: pass struct adapter to usb_read
> staging: r8188eu: pass struct adapter to usb_write
> staging: r8188eu: remove struct intf_hdl
> staging: r8188eu: remove struct intf_priv
>
> drivers/staging/r8188eu/hal/usb_ops_linux.c | 34 +--
> drivers/staging/r8188eu/include/drv_types.h | 1 -
> drivers/staging/r8188eu/include/osdep_intf.h | 32 ---
> drivers/staging/r8188eu/include/rtw_io.h | 255 -------------------
> drivers/staging/r8188eu/os_dep/usb_intf.c | 9 -
> 5 files changed, 9 insertions(+), 322 deletions(-)
>

Tested-by: Philipp Hortmann <[email protected]> # Edimax N150