aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/host_interface.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-05-02 12:43:40 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-03 13:56:35 -0700
commit9572bf9bfcf7926b84a6828352f5ac731e34d277 (patch)
treea4c893e57e9b6f4076cbec3dd714f71f8fec5a40 /drivers/staging/wilc1000/host_interface.c
parentstaging: wilc1000: remove static variable 'del_beacon' and null check (diff)
downloadlinux-dev-9572bf9bfcf7926b84a6828352f5ac731e34d277.tar.xz
linux-dev-9572bf9bfcf7926b84a6828352f5ac731e34d277.zip
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: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/host_interface.c')
-rw-r--r--drivers/staging/wilc1000/host_interface.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index ff687f6a6834..c5b24f08e75d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2017,7 +2017,6 @@ static void handle_del_beacon(struct wilc_vif *vif)
{
s32 result = 0;
struct wid wid;
- u8 *cur_byte;
u8 del_beacon = 0;
wid.id = (u16)WID_DEL_BEACON;
@@ -2025,8 +2024,6 @@ static void handle_del_beacon(struct wilc_vif *vif)
wid.size = sizeof(char);
wid.val = &del_beacon;
- cur_byte = wid.val;
-
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
@@ -2136,7 +2133,6 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
{
s32 result = 0;
struct wid wid;
- u8 *cur_byte;
wid.id = (u16)WID_REMOVE_STA;
wid.type = WID_BIN;
@@ -2146,9 +2142,7 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
if (!wid.val)
goto error;
- cur_byte = wid.val;
-
- ether_addr_copy(cur_byte, param->mac_addr);
+ ether_addr_copy(wid.val, param->mac_addr);
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));