[PATCH] staging: wlan-ng: silence incorrect type in argument 1 (different address spaces) warning
From: Ashish Kalra
Date: Tue Apr 20 2021 - 05:01:54 EST
Upon running sparse, "warning: incorrect type in argument 1 (different address spaces)
is brought to notice for this file.let's add correct typecast to make it cleaner and
silence the Sparse warning.
Signed-off-by: Ashish Kalra <eashishkalra@xxxxxxxxx>
---
drivers/staging/wlan-ng/p80211netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c
index 6f9666dc0277..70570e8a5ad2 100644
--- a/drivers/staging/wlan-ng/p80211netdev.c
+++ b/drivers/staging/wlan-ng/p80211netdev.c
@@ -569,7 +569,7 @@ static int p80211knetdev_do_ioctl(struct net_device *dev,
goto bail;
}
- msgbuf = memdup_user(req->data, req->len);
+ msgbuf = memdup_user((void __user *)req->data, req->len);
if (IS_ERR(msgbuf)) {
result = PTR_ERR(msgbuf);
goto bail;
--
2.25.1