2019-06-06 02:01:56

by Shobhit Kukreti

[permalink] [raw]
Subject: [PATCH] staging: rtl8723bs: CleanUp to remove the error reported by checkpatch

Cleaned up the code to remove the error "(foo*)" should be "(foo *)"
reported by checkpatch from the file rtl8723bs/os_dep/ioctl_linux.c

Signed-off-by: Shobhit Kukreti <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 32 +++++++++++++-------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 236a462..0be8288 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -55,7 +55,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
+ struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network));

memset(&wrqu, 0, sizeof(union iwreq_data));

@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
u8 j, blInserted = false;
int intReturn = false;
struct security_priv *psecuritypriv = &padapter->securitypriv;
- struct iw_pmksa* pPMK = (struct iw_pmksa*)extra;
+ struct iw_pmksa* pPMK = (struct iw_pmksa *)extra;
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
u8 strIssueBssid[ ETH_ALEN ] = { 0x00 };

@@ -2054,7 +2054,7 @@ static int rtw_wx_set_auth(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- struct iw_param *param = (struct iw_param*)&(wrqu->param);
+ struct iw_param *param = (struct iw_param *)&(wrqu->param);
int ret = 0;

switch (param->flags & IW_AUTH_INDEX) {
@@ -2337,8 +2337,8 @@ static int rtw_wx_read_rf(struct net_device *dev,
u32 path, addr, data32;


- path = *(u32*)extra;
- addr = *((u32*)extra + 1);
+ path = *(u32 *)extra;
+ addr = *((u32 *)extra + 1);
data32 = rtw_hal_read_rfreg(padapter, path, addr, 0xFFFFF);
/*
* IMPORTANT!!
@@ -2358,9 +2358,9 @@ static int rtw_wx_write_rf(struct net_device *dev,
u32 path, addr, data32;


- path = *(u32*)extra;
- addr = *((u32*)extra + 1);
- data32 = *((u32*)extra + 2);
+ path = *(u32 *)extra;
+ addr = *((u32 *)extra + 1);
+ data32 = *((u32 *)extra + 2);
/* DBG_871X("%s: path =%d addr = 0x%02x data = 0x%05x\n", __func__, path, addr, data32); */
rtw_hal_write_rfreg(padapter, path, addr, 0xFFFFF, data32);

@@ -2584,7 +2584,7 @@ static int rtw_wps_start(struct net_device *dev,
goto exit;
}

- uintRet = copy_from_user((void*)&u32wps_start, pdata->pointer, 4);
+ uintRet = copy_from_user((void *)&u32wps_start, pdata->pointer, 4);
if (u32wps_start == 0)
u32wps_start = *extra;

@@ -2694,7 +2694,7 @@ static int rtw_dbg_port(struct net_device *dev,
struct sta_priv *pstapriv = &padapter->stapriv;


- pdata = (u32*)&wrqu->data;
+ pdata = (u32 *)&wrqu->data;

val32 = *pdata;
arg = (u16)(val32&0x0000ffff);
@@ -3420,7 +3420,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)

case IEEE_CMD_SET_WPA_IE:
/* ret = wpa_set_wpa_ie(dev, param, p->length); */
- ret = rtw_set_wpa_ie((struct adapter *)rtw_netdev_priv(dev), (char*)param->u.wpa_ie.data, (u16)param->u.wpa_ie.len);
+ ret = rtw_set_wpa_ie((struct adapter *)rtw_netdev_priv(dev), (char *)param->u.wpa_ie.data, (u16)param->u.wpa_ie.len);
break;

case IEEE_CMD_SET_ENCRYPTION:
@@ -3824,7 +3824,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
if (WLAN_STA_HT&flags) {
psta->htpriv.ht_option = true;
psta->qos_option = 1;
- memcpy((void*)&psta->htpriv.ht_cap, (void*)&param->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
+ memcpy((void *)&psta->htpriv.ht_cap, (void *)&param->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
} else {
psta->htpriv.ht_option = false;
}
@@ -4368,7 +4368,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
char *ext;

struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- struct iw_point *dwrq = (struct iw_point*)awrq;
+ struct iw_point *dwrq = (struct iw_point *)awrq;

/* RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_notice_, ("+rtw_wx_set_priv\n")); */
if (dwrq->length == 0)
@@ -4540,7 +4540,7 @@ static int rtw_test(
}
DBG_871X("%s: string =\"%s\"\n", __func__, pbuf);

- ptmp = (char*)pbuf;
+ ptmp = (char *)pbuf;
pch = strsep(&ptmp, delim);
if ((pch == NULL) || (strlen(pch) == 0)) {
kfree(pbuf);
@@ -5038,7 +5038,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
str = strsep(&ptr, delim);
if (NULL == str) break;
sscanf(str, "%i", &temp);
- ((s32*)buffer)[count++] = (s32)temp;
+ ((s32 *)buffer)[count++] = (s32)temp;
} while (1);
buffer_len = count * sizeof(s32);

@@ -5177,7 +5177,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
case IW_PRIV_TYPE_INT:
/* Display args */
for (j = 0; j < n; j++) {
- sprintf(str, "%d ", ((__s32*)extra)[j]);
+ sprintf(str, "%d ", ((__s32 *)extra)[j]);
len = strlen(str);
output_len = strlen(output);
if ((output_len + len + 1) > 4096) {
--
2.7.4


2019-06-06 13:10:05

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: rtl8723bs: CleanUp to remove the error reported by checkpatch

On Wed, Jun 05, 2019 at 06:59:52PM -0700, Shobhit Kukreti wrote:
> Cleaned up the code to remove the error "(foo*)" should be "(foo *)"
> reported by checkpatch from the file rtl8723bs/os_dep/ioctl_linux.c

Your subject line shoudl give a hint as to what the error you are fixing
is.

Also, no need for "CleanUp" in it, that's not a real word :)

thanks,

greg k-h

2019-06-06 14:37:46

by Shobhit Kukreti

[permalink] [raw]
Subject: [PATCH v2] staging: rtl8723bs: Resolve "(foo*)" should be "(foo *)" error reported by checkpatch

Cleaned up the code to remove the error "(foo*)" should be "(foo *)"
reported by checkpatch from the file rtl8723bs/os_dep/ioctl_linux.c

Signed-off-by: Shobhit Kukreti <[email protected]>
---
Changes in v2:
- Modified commit message to include reported ERROR by checkpatch

drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 32 +++++++++++++-------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 236a462..0be8288 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -55,7 +55,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
- struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex*)(&(pmlmeinfo->network));
+ struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network));

memset(&wrqu, 0, sizeof(union iwreq_data));

@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
u8 j, blInserted = false;
int intReturn = false;
struct security_priv *psecuritypriv = &padapter->securitypriv;
- struct iw_pmksa* pPMK = (struct iw_pmksa*)extra;
+ struct iw_pmksa* pPMK = (struct iw_pmksa *)extra;
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
u8 strIssueBssid[ ETH_ALEN ] = { 0x00 };

@@ -2054,7 +2054,7 @@ static int rtw_wx_set_auth(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- struct iw_param *param = (struct iw_param*)&(wrqu->param);
+ struct iw_param *param = (struct iw_param *)&(wrqu->param);
int ret = 0;

switch (param->flags & IW_AUTH_INDEX) {
@@ -2337,8 +2337,8 @@ static int rtw_wx_read_rf(struct net_device *dev,
u32 path, addr, data32;


- path = *(u32*)extra;
- addr = *((u32*)extra + 1);
+ path = *(u32 *)extra;
+ addr = *((u32 *)extra + 1);
data32 = rtw_hal_read_rfreg(padapter, path, addr, 0xFFFFF);
/*
* IMPORTANT!!
@@ -2358,9 +2358,9 @@ static int rtw_wx_write_rf(struct net_device *dev,
u32 path, addr, data32;


- path = *(u32*)extra;
- addr = *((u32*)extra + 1);
- data32 = *((u32*)extra + 2);
+ path = *(u32 *)extra;
+ addr = *((u32 *)extra + 1);
+ data32 = *((u32 *)extra + 2);
/* DBG_871X("%s: path =%d addr = 0x%02x data = 0x%05x\n", __func__, path, addr, data32); */
rtw_hal_write_rfreg(padapter, path, addr, 0xFFFFF, data32);

@@ -2584,7 +2584,7 @@ static int rtw_wps_start(struct net_device *dev,
goto exit;
}

- uintRet = copy_from_user((void*)&u32wps_start, pdata->pointer, 4);
+ uintRet = copy_from_user((void *)&u32wps_start, pdata->pointer, 4);
if (u32wps_start == 0)
u32wps_start = *extra;

@@ -2694,7 +2694,7 @@ static int rtw_dbg_port(struct net_device *dev,
struct sta_priv *pstapriv = &padapter->stapriv;


- pdata = (u32*)&wrqu->data;
+ pdata = (u32 *)&wrqu->data;

val32 = *pdata;
arg = (u16)(val32&0x0000ffff);
@@ -3420,7 +3420,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)

case IEEE_CMD_SET_WPA_IE:
/* ret = wpa_set_wpa_ie(dev, param, p->length); */
- ret = rtw_set_wpa_ie((struct adapter *)rtw_netdev_priv(dev), (char*)param->u.wpa_ie.data, (u16)param->u.wpa_ie.len);
+ ret = rtw_set_wpa_ie((struct adapter *)rtw_netdev_priv(dev), (char *)param->u.wpa_ie.data, (u16)param->u.wpa_ie.len);
break;

case IEEE_CMD_SET_ENCRYPTION:
@@ -3824,7 +3824,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
if (WLAN_STA_HT&flags) {
psta->htpriv.ht_option = true;
psta->qos_option = 1;
- memcpy((void*)&psta->htpriv.ht_cap, (void*)&param->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
+ memcpy((void *)&psta->htpriv.ht_cap, (void *)&param->u.add_sta.ht_cap, sizeof(struct rtw_ieee80211_ht_cap));
} else {
psta->htpriv.ht_option = false;
}
@@ -4368,7 +4368,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
char *ext;

struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- struct iw_point *dwrq = (struct iw_point*)awrq;
+ struct iw_point *dwrq = (struct iw_point *)awrq;

/* RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_notice_, ("+rtw_wx_set_priv\n")); */
if (dwrq->length == 0)
@@ -4540,7 +4540,7 @@ static int rtw_test(
}
DBG_871X("%s: string =\"%s\"\n", __func__, pbuf);

- ptmp = (char*)pbuf;
+ ptmp = (char *)pbuf;
pch = strsep(&ptmp, delim);
if ((pch == NULL) || (strlen(pch) == 0)) {
kfree(pbuf);
@@ -5038,7 +5038,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
str = strsep(&ptr, delim);
if (NULL == str) break;
sscanf(str, "%i", &temp);
- ((s32*)buffer)[count++] = (s32)temp;
+ ((s32 *)buffer)[count++] = (s32)temp;
} while (1);
buffer_len = count * sizeof(s32);

@@ -5177,7 +5177,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
case IW_PRIV_TYPE_INT:
/* Display args */
for (j = 0; j < n; j++) {
- sprintf(str, "%d ", ((__s32*)extra)[j]);
+ sprintf(str, "%d ", ((__s32 *)extra)[j]);
len = strlen(str);
output_len = strlen(output);
if ((output_len + len + 1) > 4096) {
--
2.7.4