Re: [PATCH v3 1/3] staging: r8188eu: remove _io_ops structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/6/21 4:56 PM, Greg Kroah-Hartman wrote:
On Sun, Sep 05, 2021 at 12:00:46AM +0200, Fabio M. De Francesco wrote:
-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);
-
-}

This is odd, in that it resolves down to usb_read_mem which does
nothing at all.

And then no one calls this at all either?


Yep, there is no caller of this function... Idk why this was added :)

How about removing the io ops that are not used at all first, one at a
time, making it obvious what is happening, and then convert the ones
that are used one at a time, and when all is done, then removing the
structure?


Ok, sounds like a good idea. Will fix in v4, thank you

That makes it obvious what is happening and much much easier to review
for correctness.


Agree


With regards,
Pavel Skripkin




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux