Commit f57c1edc authored by Yogesh Ashok Powar's avatar Yogesh Ashok Powar Committed by John W. Linville

mwifiex: fix checkpatch --strict warnings/errors Part 4

For files main.c, main.h and pcie.c
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 931f1584
......@@ -64,11 +64,10 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops,
adapter->priv_num = 0;
/* Allocate memory for private structure */
adapter->priv[0] = kzalloc(sizeof(struct mwifiex_private),
GFP_KERNEL);
adapter->priv[0] = kzalloc(sizeof(struct mwifiex_private), GFP_KERNEL);
if (!adapter->priv[0]) {
dev_err(adapter->dev, "%s: failed to alloc priv[0]\n",
__func__);
dev_err(adapter->dev,
"%s: failed to alloc priv[0]\n", __func__);
goto error;
}
......@@ -169,8 +168,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
if ((adapter->ps_state == PS_STATE_SLEEP) &&
(adapter->pm_wakeup_card_req &&
!adapter->pm_wakeup_fw_try) &&
(is_command_pending(adapter)
|| !mwifiex_wmm_lists_empty(adapter))) {
(is_command_pending(adapter) ||
!mwifiex_wmm_lists_empty(adapter))) {
adapter->pm_wakeup_fw_try = true;
adapter->if_ops.wakeup(adapter);
continue;
......@@ -187,10 +186,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
adapter->tx_lock_flag)
break;
if (adapter->scan_processing || adapter->data_sent
|| mwifiex_wmm_lists_empty(adapter)) {
if (adapter->cmd_sent || adapter->curr_cmd
|| (!is_command_pending(adapter)))
if (adapter->scan_processing || adapter->data_sent ||
mwifiex_wmm_lists_empty(adapter)) {
if (adapter->cmd_sent || adapter->curr_cmd ||
(!is_command_pending(adapter)))
break;
}
}
......@@ -223,10 +222,10 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
/* * The ps_state may have been changed during processing of
* Sleep Request event.
*/
if ((adapter->ps_state == PS_STATE_SLEEP)
|| (adapter->ps_state == PS_STATE_PRE_SLEEP)
|| (adapter->ps_state == PS_STATE_SLEEP_CFM)
|| adapter->tx_lock_flag)
if ((adapter->ps_state == PS_STATE_SLEEP) ||
(adapter->ps_state == PS_STATE_PRE_SLEEP) ||
(adapter->ps_state == PS_STATE_SLEEP_CFM) ||
adapter->tx_lock_flag)
continue;
if (!adapter->cmd_sent && !adapter->curr_cmd) {
......@@ -249,8 +248,8 @@ int mwifiex_main_process(struct mwifiex_adapter *adapter)
}
if (adapter->delay_null_pkt && !adapter->cmd_sent &&
!adapter->curr_cmd && !is_command_pending(adapter)
&& mwifiex_wmm_lists_empty(adapter)) {
!adapter->curr_cmd && !is_command_pending(adapter) &&
mwifiex_wmm_lists_empty(adapter)) {
if (!mwifiex_send_null_packet
(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET |
......@@ -494,8 +493,8 @@ mwifiex_set_mac_address(struct net_device *dev, void *addr)
if (!ret)
memcpy(priv->netdev->dev_addr, priv->curr_addr, ETH_ALEN);
else
dev_err(priv->adapter->dev, "set mac address failed: ret=%d"
"\n", ret);
dev_err(priv->adapter->dev,
"set mac address failed: ret=%d\n", ret);
memcpy(dev->dev_addr, priv->curr_addr, ETH_ALEN);
......
......@@ -841,8 +841,8 @@ mwifiex_get_priv_by_id(struct mwifiex_adapter *adapter,
for (i = 0; i < adapter->priv_num; i++) {
if (adapter->priv[i]) {
if ((adapter->priv[i]->bss_num == bss_num)
&& (adapter->priv[i]->bss_type == bss_type))
if ((adapter->priv[i]->bss_num == bss_num) &&
(adapter->priv[i]->bss_type == bss_type))
break;
}
}
......
This diff is collapsed.
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