From 678fb0b65e6eac8c550260f37531b8ecd53cd8bd Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Fri, 26 Nov 2021 18:31:58 +0100 Subject: [PATCH] staging: r8188eu: rtw_read_port needs no cnt parameter The cnt parameter in the rtw_read_port function is not used. Remove it. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20211126173205.21352-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/hal/usb_halinit.c | 2 +- drivers/staging/r8188eu/hal/usb_ops_linux.c | 8 ++++---- drivers/staging/r8188eu/include/rtw_io.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 04518e9..af90127 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -953,7 +953,7 @@ unsigned int rtl8188eu_inirp_init(struct adapter *Adapter) /* issue Rx irp to receive data */ precvbuf = (struct recv_buf *)precvpriv->precv_buf; for (i = 0; i < NR_RECVBUFF; i++) { - if (!rtw_read_port(Adapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf)) { + if (!rtw_read_port(Adapter, precvpriv->ff_hwaddr, (unsigned char *)precvbuf)) { status = _FAIL; goto exit; } diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c index e4a9350..92fcc44 100644 --- a/drivers/staging/r8188eu/hal/usb_ops_linux.c +++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c @@ -401,7 +401,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) if (purb->status == 0) { /* SUCCESS */ if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)) { precvbuf->reuse = true; - rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); + rtw_read_port(adapt, precvpriv->ff_hwaddr, (unsigned char *)precvbuf); DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__); } else { rtw_reset_continual_urb_error(adapter_to_dvobj(adapt)); @@ -415,7 +415,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) precvbuf->pskb = NULL; precvbuf->reuse = false; - rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); + rtw_read_port(adapt, precvpriv->ff_hwaddr, (unsigned char *)precvbuf); } } else { DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status); @@ -436,7 +436,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) case -EPROTO: case -EOVERFLOW: precvbuf->reuse = true; - rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); + rtw_read_port(adapt, precvpriv->ff_hwaddr, (unsigned char *)precvbuf); break; case -EINPROGRESS: DBG_88E("ERROR: URB IS IN PROGRESS!/n"); @@ -447,7 +447,7 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) } } -u32 rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *rmem) +u32 rtw_read_port(struct adapter *adapter, u32 addr, u8 *rmem) { struct urb *purb = NULL; struct recv_buf *precvbuf = (struct recv_buf *)rmem; diff --git a/drivers/staging/r8188eu/include/rtw_io.h b/drivers/staging/r8188eu/include/rtw_io.h index c6a0782..0e896d0 100644 --- a/drivers/staging/r8188eu/include/rtw_io.h +++ b/drivers/staging/r8188eu/include/rtw_io.h @@ -224,7 +224,7 @@ u8 rtw_read8(struct adapter *adapter, u32 addr); u16 rtw_read16(struct adapter *adapter, u32 addr); u32 rtw_read32(struct adapter *adapter, u32 addr); void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); -u32 rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem); +u32 rtw_read_port(struct adapter *adapter, u32 addr, u8 *pmem); void rtw_read_port_cancel(struct adapter *adapter); int rtw_write8(struct adapter *adapter, u32 addr, u8 val); -- 2.7.4