* [PATCH v5] staging: r8188eu: Remove useless function rtw_test()
@ 2021-12-27 11:33 Jiapeng Chong
2021-12-30 10:55 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-12-27 11:33 UTC (permalink / raw)
To: Larry.Finger
Cc: phil, gregkh, linux-staging, linux-kernel, Jiapeng Chong,
Abaci Robot
This function does nothing, so it should just be deleted entirely.
Fix following coccicheck warning:
./drivers/staging/r8188eu/os_dep/ioctl_linux.c:4253:8-15: WARNING
opportunity for memdup_user.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
Changes in v2:
-Modified subject line and commit message.
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 38 --------------------
1 file changed, 38 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index e7f35143dfe1..518625730883 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -4229,43 +4229,6 @@ static int rtw_tdls_get(struct net_device *dev,
return 0;
}
-static int rtw_test(
- struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- u32 len;
- u8 *pbuf, *pch;
- char *ptmp;
- u8 *delim = ",";
-
- DBG_88E("+%s\n", __func__);
- len = wrqu->data.length;
-
- pbuf = kzalloc(len, GFP_KERNEL);
- if (!pbuf) {
- DBG_88E("%s: no memory!\n", __func__);
- return -ENOMEM;
- }
-
- if (copy_from_user(pbuf, wrqu->data.pointer, len)) {
- kfree(pbuf);
- DBG_88E("%s: copy from user fail!\n", __func__);
- return -EFAULT;
- }
- DBG_88E("%s: string =\"%s\"\n", __func__, pbuf);
-
- ptmp = (char *)pbuf;
- pch = strsep(&ptmp, delim);
- if (!pch || strlen(pch) == 0) {
- kfree(pbuf);
- DBG_88E("%s: parameter error(level 1)!\n", __func__);
- return -EFAULT;
- }
- kfree(pbuf);
- return 0;
-}
-
static iw_handler rtw_handlers[] = {
IW_HANDLER(SIOCGIWNAME, rtw_wx_get_name),
IW_HANDLER(SIOCGIWFREQ, rtw_wx_get_freq),
@@ -4431,7 +4394,6 @@ NULL, /* 0x03 */
NULL, /* 0x1A */
NULL, /* 0x1B */
NULL, /* 0x1C is reserved for hostapd */
- rtw_test, /* 0x1D */
};
static struct iw_statistics *rtw_get_wireless_stats(struct net_device *dev)
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v5] staging: r8188eu: Remove useless function rtw_test()
2021-12-27 11:33 [PATCH v5] staging: r8188eu: Remove useless function rtw_test() Jiapeng Chong
@ 2021-12-30 10:55 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-12-30 10:55 UTC (permalink / raw)
To: Jiapeng Chong
Cc: Larry.Finger, phil, linux-staging, linux-kernel, Abaci Robot
On Mon, Dec 27, 2021 at 07:33:05PM +0800, Jiapeng Chong wrote:
> This function does nothing, so it should just be deleted entirely.
>
> Fix following coccicheck warning:
>
> ./drivers/staging/r8188eu/os_dep/ioctl_linux.c:4253:8-15: WARNING
> opportunity for memdup_user.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> Changes in v2:
> -Modified subject line and commit message.
>
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 38 --------------------
> 1 file changed, 38 deletions(-)
Does not apply to my tree at all anymore, please rebase and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-30 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-27 11:33 [PATCH v5] staging: r8188eu: Remove useless function rtw_test() Jiapeng Chong
2021-12-30 10:55 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).