Commit e6249e15 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

rsi: fix static checker warning

u32 pointer is changed to u16 and filled the value. Problem is
solved by using local temporary variable. Below static checker
warning was reported.

drivers/net/wireless/rsi/rsi_91x_usb.c:400 rsi_usb_master_reg_read()
        warn: passing casted pointer 'value' to 'rsi_usb_reg_read()'
32 vs 16.

Fixes: b97e9b94 ("rsi: Add new host interface operations")
Signed-off-by: default avatarAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 59f73e2a
...@@ -404,8 +404,15 @@ static int rsi_usb_master_reg_read(struct rsi_hw *adapter, u32 reg, ...@@ -404,8 +404,15 @@ static int rsi_usb_master_reg_read(struct rsi_hw *adapter, u32 reg,
{ {
struct usb_device *usbdev = struct usb_device *usbdev =
((struct rsi_91x_usbdev *)adapter->rsi_dev)->usbdev; ((struct rsi_91x_usbdev *)adapter->rsi_dev)->usbdev;
u16 temp;
int ret;
return rsi_usb_reg_read(usbdev, reg, (u16 *)value, len); ret = rsi_usb_reg_read(usbdev, reg, &temp, len);
if (ret < 0)
return ret;
*value = temp;
return 0;
} }
static int rsi_usb_master_reg_write(struct rsi_hw *adapter, static int rsi_usb_master_reg_write(struct rsi_hw *adapter,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment