staging: r8188eu: remove usb_{read,write}_mem()
authorPavel Skripkin <paskripkin@gmail.com>
Fri, 17 Sep 2021 07:18:19 +0000 (09:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Sep 2021 14:32:58 +0000 (16:32 +0200)
Remove usb_{read,write}_mem() because they are unused.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/20210917071837.10926-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_io.c
drivers/staging/r8188eu/hal/usb_ops_linux.c
drivers/staging/r8188eu/include/rtw_io.h
drivers/staging/r8188eu/include/usb_ops_linux.h
drivers/staging/r8188eu/os_dep/usb_ops_linux.c

index cde0205..e6f3773 100644 (file)
@@ -175,35 +175,6 @@ int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val)
        return RTW_STATUS_CODE(ret);
 }
 
-void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &pio_priv->intf;
-
-
-       if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
-            return;
-       _read_mem = pintfhdl->io_ops._read_mem;
-       _read_mem(pintfhdl, addr, cnt, pmem);
-
-}
-
-void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &pio_priv->intf;
-
-
-
-       _write_mem = pintfhdl->io_ops._write_mem;
-
-       _write_mem(pintfhdl, addr, cnt, pmem);
-
-
-}
-
 void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
 {
        u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
index 065b0d8..7f30b00 100644 (file)
@@ -541,13 +541,11 @@ void rtl8188eu_set_intf_ops(struct _io_ops        *pops)
        pops->_read8 = &usb_read8;
        pops->_read16 = &usb_read16;
        pops->_read32 = &usb_read32;
-       pops->_read_mem = &usb_read_mem;
        pops->_read_port = &usb_read_port;
        pops->_write8 = &usb_write8;
        pops->_write16 = &usb_write16;
        pops->_write32 = &usb_write32;
        pops->_writeN = &usb_writeN;
-       pops->_write_mem = &usb_write_mem;
        pops->_write_port = &usb_write_port;
        pops->_read_port_cancel = &usb_read_port_cancel;
        pops->_write_port_cancel = &usb_write_port_cancel;
index 263a37d..5ef89c7 100644 (file)
@@ -270,8 +270,6 @@ void _rtw_write_port_cancel(struct adapter *adapter);
 #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
 #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
 #define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
-#define rtw_read_mem(adapter, addr, cnt, mem)                          \
-       _rtw_read_mem((adapter), (addr), (cnt), (mem))
 #define rtw_read_port(adapter, addr, cnt, mem)                         \
        _rtw_read_port((adapter), (addr), (cnt), (mem))
 #define rtw_read_port_cancel(adapter) _rtw_read_port_cancel((adapter))
@@ -290,8 +288,6 @@ void _rtw_write_port_cancel(struct adapter *adapter);
        _rtw_write16_async((adapter), (addr), (val))
 #define rtw_write32_async(adapter, addr, val)                          \
        _rtw_write32_async((adapter), (addr), (val))
-#define rtw_write_mem(adapter, addr, cnt, mem)                         \
-       _rtw_write_mem((adapter), (addr), (cnt), (mem))
 #define rtw_write_port(adapter, addr, cnt, mem)                                \
        _rtw_write_port((adapter), (addr), (cnt), (mem))
 #define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms)   \
index c357a3b..37e0614 100644 (file)
@@ -28,9 +28,6 @@
 
 unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
 
-void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
-void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
-
 void usb_read_port_cancel(struct intf_hdl *pintfhdl);
 
 u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
index 9287301..9afb4df 100644 (file)
@@ -31,14 +31,6 @@ struct zero_bulkout_context {
        void *padapter;
 };
 
-void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
-{
-}
-
-void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
-{
-}
-
 void usb_read_port_cancel(struct intf_hdl *pintfhdl)
 {
        int i;