staging: wilc1000: host_interface.c: Modify return statement.
PATCH v2 1/1 staging: wilc1000: host_interface.c: Modify return statement.
Challenge suggested by coccinelle.
Remove return variable and directly return the value Issue found using ret.cocci
---
Changes in v2:
Adjust spaces for last argument in return statement.
drivers/staging/wilc1000/host_interface.c | 31 +++++++---------------- 1 file changed, 9 insertions(+), 22 deletions(-)
drivers/staging/wilc1000/host_interface.c +9 -22
@@ -1358,17 +1358,14 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,int wilc_set_pmkid_info (struct wilc_vif *vif,struct wilc_pmkid_attr *pmkid) {struct wid wid; -int result; wid.id =WID_PMKID_INFO ; wid.type =WID_STR ; wid.size = (pmkid->numpmkid *sizeof (struct wilc_pmkid )) +1 ; wid.val = (u8 *)pmkid; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); - -return result; +return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , +wilc_get_vif_idx (vif)); }int wilc_get_mac_address (struct wilc_vif *vif,u8 *mac_addr)
@@ -1403,8 +1400,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies, conn_info->req_ies_len = ies_len; conn_info->req_ies =kmemdup (ies, ies_len,GFP_KERNEL );if (!conn_info->req_ies) { - result = -ENOMEM ; -return result; +return -ENOMEM ; } }
@@ -1570,7 +1566,6 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param) {struct wid wid_list[4 ];int i =0 ; -int result;if (param->flag &WILC_CFG_PARAM_RETRY_SHORT ) { wid_list[i].id =WID_SHORT_RETRY_LIMIT ;
@@ -1601,10 +1596,8 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param) i++; } - result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, - i,wilc_get_vif_idx (vif)); - -return result; +return wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, + i,wilc_get_vif_idx (vif)); }static void get_periodic_rssi (struct timer_list *t)
@@ -2121,7 +2114,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,int wilc_set_tx_power (struct wilc_vif *vif,u8 tx_power) { -int ret;struct wid wid; wid.id =WID_TX_POWER ;
@@ -2129,15 +2121,12 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power) wid.val = &tx_power; wid.size =sizeof (char ); - ret =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); - -return ret; +return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , +wilc_get_vif_idx (vif)); }int wilc_get_tx_power (struct wilc_vif *vif,u8 *tx_power) { -int ret;struct wid wid; wid.id =WID_TX_POWER ;
@@ -2145,8 +2134,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power) wid.val = tx_power; wid.size =sizeof (char ); - ret =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); - -return ret; +return wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , +wilc_get_vif_idx (vif)); }
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 10 lines · Sanjana Sanikommu
Challenge suggested by coccinelle.
Remove return variable and directly return the value Issue found usingret.cocciSigned-off-by Sanjana Sanikommu <[email protected]>---
Changes in v2:
Adjust spaces for last argument in return statement.drivers/staging/wilc1000/host_interface.c | 31 +++++++---------------- 1 file changed, 9 insertions(+), 22 deletions(-)
You sent 3 different patches with the same subject line, so I have no idea what is going on here. Please make this a patch series of all remaining patches for this driver, so I have a chance to be able to review it properly.
thanks,
greg k-h
Quoted 13 lines · gregkh
Quoted 10 lines · Sanjana Sanikommu
Challenge suggested by coccinelle.
Remove return variable and directly return the value Issue found usingret.cocciSigned-off-by Sanjana Sanikommu <[email protected] <javascript:>>---
Changes in v2:
Adjust spaces for last argument in return statement.drivers/staging/wilc1000/host_interface.c | 31 +++++++---------------- 1 file changed, 9 insertions(+), 22 deletions(-)
Quoted 5 lines
You sent 3 different patches with the same subject line, so I have no idea what is going on here. Please make this a patch series of all remaining patches for this driver, so I have a chance to be able to review it properly.
Sure I would make a patch series and send them in v3
Quoted 5 lines
thanks,
greg k-h