From: Dan Carpenter <dan.carpenter@oracle.com>
To: bzhao@marvell.com
Cc: linux-wireless@vger.kernel.org
Subject: re: wireless: mwifiex: initial commit for Marvell mwifiex driver
Date: Tue, 24 Nov 2015 17:27:45 +0300 [thread overview]
Message-ID: <20151124142745.GA24420@mwanda> (raw)
Hello Bing Zhao,
The patch 5e6e3a92b9a4: "wireless: mwifiex: initial commit for
Marvell mwifiex driver" from Mar 21, 2011, leads to the following
static checker warning:
drivers/net/wireless/marvell/mwifiex/sta_event.c:634 mwifiex_process_sta_event()
warn: inconsistent indenting
drivers/net/wireless/marvell/mwifiex/sta_event.c
608 case EVENT_PS_AWAKE:
609 mwifiex_dbg(adapter, EVENT, "info: EVENT: AWAKE\n");
610 if (!adapter->pps_uapsd_mode && priv->port_open &&
611 priv->media_connected && adapter->sleep_period.period) {
612 adapter->pps_uapsd_mode = true;
613 mwifiex_dbg(adapter, EVENT,
614 "event: PPS/UAPSD mode activated\n");
615 }
616 adapter->tx_lock_flag = false;
617 if (adapter->pps_uapsd_mode && adapter->gen_null_pkt) {
618 if (mwifiex_check_last_packet_indication(priv)) {
619 if (adapter->data_sent ||
620 (adapter->if_ops.is_port_ready &&
621 !adapter->if_ops.is_port_ready(priv))) {
622 adapter->ps_state = PS_STATE_AWAKE;
623 adapter->pm_wakeup_card_req = false;
624 adapter->pm_wakeup_fw_try = false;
625 del_timer(&adapter->wakeup_timer);
626 break;
627 }
628 if (!mwifiex_send_null_packet
629 (priv,
630 MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET |
631 MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET))
632 adapter->ps_state =
633 PS_STATE_SLEEP;
634 return 0;
The PS_STATE_SLEEP line is indented one tab more than it should be. It
looks like the code is buggy? Possibly curly braces were intended:
if (!mwifiex_send_null_packet(priv,
MWIFIEX_TxPD_POWER_MGMT_NULL_PACKET |
MWIFIEX_TxPD_POWER_MGMT_LAST_PACKET)) {
adapter->ps_state = PS_STATE_SLEEP;
return 0;
}
We're right up against the 80 character limit so it's hard to be sure.
635 }
636 }
637 adapter->ps_state = PS_STATE_AWAKE;
638 adapter->pm_wakeup_card_req = false;
639 adapter->pm_wakeup_fw_try = false;
640 del_timer(&adapter->wakeup_timer);
641
642 break;
643
644 case EVENT_DEEP_SLEEP_AWAKE:
regards,
dan carpenter
next reply other threads:[~2015-11-24 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 14:27 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-24 14:38 wireless: mwifiex: initial commit for Marvell mwifiex driver Dan Carpenter
2012-04-25 8:44 Dan Carpenter
2012-04-25 22:08 ` Bing Zhao
2012-04-26 12:51 ` Dan Carpenter
2012-04-26 19:25 ` Bing Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151124142745.GA24420@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bzhao@marvell.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.