Commit 9572bf9b authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: remove the use of cur_byte variable in functions

Instead of using the intermediate variable to hold the value, now directly
using the allocated variable.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 228d0422
...@@ -2017,7 +2017,6 @@ static void handle_del_beacon(struct wilc_vif *vif) ...@@ -2017,7 +2017,6 @@ static void handle_del_beacon(struct wilc_vif *vif)
{ {
s32 result = 0; s32 result = 0;
struct wid wid; struct wid wid;
u8 *cur_byte;
u8 del_beacon = 0; u8 del_beacon = 0;
wid.id = (u16)WID_DEL_BEACON; wid.id = (u16)WID_DEL_BEACON;
...@@ -2025,8 +2024,6 @@ static void handle_del_beacon(struct wilc_vif *vif) ...@@ -2025,8 +2024,6 @@ static void handle_del_beacon(struct wilc_vif *vif)
wid.size = sizeof(char); wid.size = sizeof(char);
wid.val = &del_beacon; wid.val = &del_beacon;
cur_byte = wid.val;
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif)); wilc_get_vif_idx(vif));
if (result) if (result)
...@@ -2136,7 +2133,6 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param) ...@@ -2136,7 +2133,6 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
{ {
s32 result = 0; s32 result = 0;
struct wid wid; struct wid wid;
u8 *cur_byte;
wid.id = (u16)WID_REMOVE_STA; wid.id = (u16)WID_REMOVE_STA;
wid.type = WID_BIN; wid.type = WID_BIN;
...@@ -2146,9 +2142,7 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param) ...@@ -2146,9 +2142,7 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
if (!wid.val) if (!wid.val)
goto error; goto error;
cur_byte = wid.val; ether_addr_copy(wid.val, param->mac_addr);
ether_addr_copy(cur_byte, param->mac_addr);
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif)); wilc_get_vif_idx(vif));
......
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