aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cmdevt.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-05-03 23:11:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-05 14:59:16 -0400
commit270e58e8898c8be40451ebee45b6c9b5bd5db04b (patch)
tree4dd71a0e18a3f5528af59fcaebc61d98377792e5 /drivers/net/wireless/mwifiex/cmdevt.c
parent57f16b5da03784d1660133fbec7281ea5735da69 (diff)
mwifiex: remove unnecessary variable initialization
Skip initialization of local variables with some default values if the values are not going to be used further down the code path. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 776146a104ec..b75cc9271a19 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -128,7 +128,7 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
128{ 128{
129 129
130 struct mwifiex_adapter *adapter = priv->adapter; 130 struct mwifiex_adapter *adapter = priv->adapter;
131 int ret = 0; 131 int ret;
132 struct host_cmd_ds_command *host_cmd; 132 struct host_cmd_ds_command *host_cmd;
133 uint16_t cmd_code; 133 uint16_t cmd_code;
134 uint16_t cmd_size; 134 uint16_t cmd_size;
@@ -222,8 +222,8 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
222 */ 222 */
223static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter) 223static int mwifiex_dnld_sleep_confirm_cmd(struct mwifiex_adapter *adapter)
224{ 224{
225 int ret = 0; 225 int ret;
226 u16 cmd_len = 0; 226 u16 cmd_len;
227 struct mwifiex_private *priv; 227 struct mwifiex_private *priv;
228 struct mwifiex_opt_sleep_confirm_buffer *sleep_cfm_buf = 228 struct mwifiex_opt_sleep_confirm_buffer *sleep_cfm_buf =
229 (struct mwifiex_opt_sleep_confirm_buffer *) 229 (struct mwifiex_opt_sleep_confirm_buffer *)
@@ -364,13 +364,13 @@ int mwifiex_free_cmd_buffer(struct mwifiex_adapter *adapter)
364 */ 364 */
365int mwifiex_process_event(struct mwifiex_adapter *adapter) 365int mwifiex_process_event(struct mwifiex_adapter *adapter)
366{ 366{
367 int ret = 0; 367 int ret;
368 struct mwifiex_private *priv = 368 struct mwifiex_private *priv =
369 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); 369 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
370 struct sk_buff *skb = adapter->event_skb; 370 struct sk_buff *skb = adapter->event_skb;
371 u32 eventcause = adapter->event_cause; 371 u32 eventcause = adapter->event_cause;
372 struct timeval tstamp; 372 struct timeval tstamp;
373 struct mwifiex_rxinfo *rx_info = NULL; 373 struct mwifiex_rxinfo *rx_info;
374 374
375 /* Save the last event to debug log */ 375 /* Save the last event to debug log */
376 adapter->dbg.last_event_index = 376 adapter->dbg.last_event_index =
@@ -446,10 +446,10 @@ int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
446int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, 446int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
447 u16 cmd_action, u32 cmd_oid, void *data_buf) 447 u16 cmd_action, u32 cmd_oid, void *data_buf)
448{ 448{
449 int ret = 0; 449 int ret;
450 struct mwifiex_adapter *adapter = priv->adapter; 450 struct mwifiex_adapter *adapter = priv->adapter;
451 struct cmd_ctrl_node *cmd_node = NULL; 451 struct cmd_ctrl_node *cmd_node;
452 struct host_cmd_ds_command *cmd_ptr = NULL; 452 struct host_cmd_ds_command *cmd_ptr;
453 453
454 if (!adapter) { 454 if (!adapter) {
455 pr_err("PREP_CMD: adapter is NULL\n"); 455 pr_err("PREP_CMD: adapter is NULL\n");
@@ -605,8 +605,8 @@ mwifiex_insert_cmd_to_pending_q(struct mwifiex_adapter *adapter,
605 */ 605 */
606int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter) 606int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter)
607{ 607{
608 struct mwifiex_private *priv = NULL; 608 struct mwifiex_private *priv;
609 struct cmd_ctrl_node *cmd_node = NULL; 609 struct cmd_ctrl_node *cmd_node;
610 int ret = 0; 610 int ret = 0;
611 struct host_cmd_ds_command *host_cmd; 611 struct host_cmd_ds_command *host_cmd;
612 unsigned long cmd_flags; 612 unsigned long cmd_flags;
@@ -673,7 +673,7 @@ int mwifiex_exec_next_cmd(struct mwifiex_adapter *adapter)
673 */ 673 */
674int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter) 674int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
675{ 675{
676 struct host_cmd_ds_command *resp = NULL; 676 struct host_cmd_ds_command *resp;
677 struct mwifiex_private *priv = 677 struct mwifiex_private *priv =
678 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); 678 mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
679 int ret = 0; 679 int ret = 0;
@@ -805,7 +805,7 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
805{ 805{
806 struct mwifiex_adapter *adapter = 806 struct mwifiex_adapter *adapter =
807 (struct mwifiex_adapter *) function_context; 807 (struct mwifiex_adapter *) function_context;
808 struct cmd_ctrl_node *cmd_node = NULL; 808 struct cmd_ctrl_node *cmd_node;
809 struct timeval tstamp; 809 struct timeval tstamp;
810 810
811 adapter->num_cmd_timeout++; 811 adapter->num_cmd_timeout++;
@@ -877,7 +877,7 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
877void 877void
878mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter) 878mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
879{ 879{
880 struct cmd_ctrl_node *cmd_node = NULL, *tmp_node = NULL; 880 struct cmd_ctrl_node *cmd_node = NULL, *tmp_node;
881 unsigned long flags; 881 unsigned long flags;
882 882
883 /* Cancel current cmd */ 883 /* Cancel current cmd */
@@ -1160,7 +1160,7 @@ int mwifiex_cmd_enh_power_mode(struct mwifiex_private *priv,
1160{ 1160{
1161 struct host_cmd_ds_802_11_ps_mode_enh *psmode_enh = 1161 struct host_cmd_ds_802_11_ps_mode_enh *psmode_enh =
1162 &cmd->params.psmode_enh; 1162 &cmd->params.psmode_enh;
1163 u8 *tlv = NULL; 1163 u8 *tlv;
1164 u16 cmd_size = 0; 1164 u16 cmd_size = 0;
1165 1165
1166 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_PS_MODE_ENH); 1166 cmd->command = cpu_to_le16(HostCmd_CMD_802_11_PS_MODE_ENH);