[PATCH v8 14/19] staging: r8188eu: remove an unnecessary bit AND from rtw_writeN()
From: Fabio M. De Francesco
Date: Sun Sep 19 2021 - 19:57:14 EST
Remove an unnecessary bitwise AND because "length" can never be greater
than 0xffff since VENDOR_CMD_MAX_DATA_LEN is defined as (a weird) '254'.
Co-developed-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@xxxxxxxxx>
---
drivers/staging/r8188eu/hal/usb_ops_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index aa57bd7b8f10..625b29af9410 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -178,7 +178,7 @@ int rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *data)
if (length > VENDOR_CMD_MAX_DATA_LEN)
return _FAIL;
- ret = usbctrl_vendorreq(intfhdl, value, data, (length & 0xffff), REALTEK_USB_VENQT_WRITE);
+ ret = usbctrl_vendorreq(intfhdl, value, data, length, REALTEK_USB_VENQT_WRITE);
return RTW_STATUS_CODE(ret);
}
--
2.33.0