LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem()
@ 2021-08-21 23:55 Bryan Brattlof
  2021-08-21 23:55 ` [PATCH 5/6] staging: rtl8723bs: remove unused definitions from rtw_io.h Bryan Brattlof
  2021-08-26 10:03 ` [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Greg Kroah-Hartman
  0 siblings, 2 replies; 3+ messages in thread
From: Bryan Brattlof @ 2021-08-21 23:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Bryan Brattlof, linux-staging, linux-kernel

The sdio_write_mem() function is unused in the driver. We can remove it.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
 drivers/staging/rtl8723bs/hal/sdio_ops.c   | 11 -----------
 drivers/staging/rtl8723bs/include/rtw_io.h |  1 -
 2 files changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index a545832a468e..b784a390c8e1 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -356,16 +356,6 @@ static void sdio_read_mem(
 	sdio_readN(intfhdl, addr, cnt, rmem);
 }

-static void sdio_write_mem(
-	struct intf_hdl *intfhdl,
-	u32 addr,
-	u32 cnt,
-	u8 *wmem
-)
-{
-	sdio_writeN(intfhdl, addr, cnt, wmem);
-}
-
 /*
  * Description:
  *Read from RX FIFO
@@ -474,7 +464,6 @@ void sdio_set_intf_ops(struct adapter *adapter, struct _io_ops *ops)
 	ops->_write16 = &sdio_write16;
 	ops->_write32 = &sdio_write32;
 	ops->_writeN = &sdio_writeN;
-	ops->_write_mem = &sdio_write_mem;
 	ops->_write_port = &sdio_write_port;
 }

diff --git a/drivers/staging/rtl8723bs/include/rtw_io.h b/drivers/staging/rtl8723bs/include/rtw_io.h
index e98083a07a66..87f36b7e880f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_io.h
+++ b/drivers/staging/rtl8723bs/include/rtw_io.h
@@ -91,7 +91,6 @@ struct _io_ops {
 		int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);

 		void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-		void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);

 		void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);

--
2.30.2



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

* [PATCH 5/6] staging: rtl8723bs: remove unused definitions from rtw_io.h
  2021-08-21 23:55 [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Bryan Brattlof
@ 2021-08-21 23:55 ` Bryan Brattlof
  2021-08-26 10:03 ` [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Bryan Brattlof @ 2021-08-21 23:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Bryan Brattlof, linux-staging, linux-kernel

There are a few unused definitions inside rtw_io.h We can remove them.

Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com>
---
 drivers/staging/rtl8723bs/include/rtw_io.h | 91 ----------------------
 1 file changed, 91 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_io.h b/drivers/staging/rtl8723bs/include/rtw_io.h
index 43102f65bddd..fa0cedadaa79 100644
--- a/drivers/staging/rtl8723bs/include/rtw_io.h
+++ b/drivers/staging/rtl8723bs/include/rtw_io.h
@@ -72,9 +72,7 @@

 #define _INTF_ASYNC_	BIT(0)	/* support async io */

-struct intf_priv;
 struct intf_hdl;
-struct io_queue;

 struct _io_ops {
 		u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
@@ -85,33 +83,8 @@ struct _io_ops {
 		int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
 		int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);

-		int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
-		int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
-		int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
-
-		void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
-
-		u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
-
 		u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
 		u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-
-		u32 (*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem);
-
-		void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
-		void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
-};
-
-struct io_req {
-	struct list_head	list;
-	u32 addr;
-	volatile u32 val;
-	u32 command;
-	u32 status;
-	u8 *pbuf;
-
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt);
-	u8 *cnxt;
 };

 struct	intf_hdl {
@@ -132,16 +105,6 @@ 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;
-};
-
 struct io_priv {

 	struct adapter *padapter;
@@ -150,20 +113,6 @@ struct io_priv {

 };

-extern uint ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
-extern void sync_ioreq_enqueue(struct io_req *preq, struct io_queue *ioqueue);
-extern uint sync_ioreq_flush(struct adapter *adapter, struct io_queue *ioqueue);
-
-
-extern uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
-extern struct io_req *alloc_ioreq(struct io_queue *pio_q);
-
-extern uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
-extern void unregister_intf_hdl(struct intf_hdl *pintfhdl);
-
-extern void _rtw_attrib_read(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-extern void _rtw_attrib_write(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
 extern u8 rtw_read8(struct adapter *adapter, u32 addr);
 extern u16 rtw_read16(struct adapter *adapter, u32 addr);
 extern u32 rtw_read32(struct adapter *adapter, u32 addr);
@@ -174,46 +123,6 @@ extern int rtw_write32(struct adapter *adapter, u32 addr, u32 val);

 extern u32 rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);

-extern void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem);
-
-/* ioreq */
-extern void ioreq_read8(struct adapter *adapter, u32 addr, u8 *pval);
-extern void ioreq_read16(struct adapter *adapter, u32 addr, u16 *pval);
-extern void ioreq_read32(struct adapter *adapter, u32 addr, u32 *pval);
-extern void ioreq_write8(struct adapter *adapter, u32 addr, u8 val);
-extern void ioreq_write16(struct adapter *adapter, u32 addr, u16 val);
-extern void ioreq_write32(struct adapter *adapter, u32 addr, u32 val);
-
-
-extern uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-extern uint async_read16(struct adapter *adapter, u32 addr,  u8 *pbuff,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-extern uint async_read32(struct adapter *adapter, u32 addr,  u8 *pbuff,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-
-extern void async_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-extern void async_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
-extern void async_write8(struct adapter *adapter, u32 addr, u8 val,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-extern void async_write16(struct adapter *adapter, u32 addr, u16 val,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-extern void async_write32(struct adapter *adapter, u32 addr, u32 val,
-	void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
-
-extern void async_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-extern void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
-
 int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapter *padapter, struct _io_ops *pops));

-
-extern uint alloc_io_queue(struct adapter *adapter);
-extern void free_io_queue(struct adapter *adapter);
-extern void async_bus_io(struct io_queue *pio_q);
-extern void bus_sync_io(struct io_queue *pio_q);
-extern u32 _ioreq2rwmem(struct io_queue *pio_q);
-extern void dev_power_down(struct adapter *Adapter, u8 bpwrup);
-
 #endif	/* _RTL8711_IO_H_ */
--
2.30.2



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

* Re: [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem()
  2021-08-21 23:55 [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Bryan Brattlof
  2021-08-21 23:55 ` [PATCH 5/6] staging: rtl8723bs: remove unused definitions from rtw_io.h Bryan Brattlof
@ 2021-08-26 10:03 ` Greg Kroah-Hartman
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-08-26 10:03 UTC (permalink / raw)
  To: Bryan Brattlof; +Cc: linux-staging, linux-kernel

On Sat, Aug 21, 2021 at 11:55:05PM +0000, Bryan Brattlof wrote:
> The sdio_write_mem() function is unused in the driver. We can remove it.
> 

How do we know it is unused?

Please remove the pointer as well, at the same time, so that we can
obviously see that it is unused (or not).

Same for the other patches in this series.

Also, when you resend this, please use git send-email properly, so that
the patches are threaded so our tools can pick them up easier.  This
series was not threaded for some odd reason.

thanks,

greg k-h

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

end of thread, other threads:[~2021-08-26 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 23:55 [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Bryan Brattlof
2021-08-21 23:55 ` [PATCH 5/6] staging: rtl8723bs: remove unused definitions from rtw_io.h Bryan Brattlof
2021-08-26 10:03 ` [PATCH 1/6] staging: rtl8723bs: remove sdio_write_mem() Greg Kroah-Hartman

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