From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>,
Intel Linux Wireless <ilw@linux.intel.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch v2] iwlwifi: turn on a lockdep assertion
Date: Sun, 10 Jun 2012 11:25:22 +0000 [thread overview]
Message-ID: <20120610112521.GA20676@elgon.mountain> (raw)
In-Reply-To: <1339265576.5029.1.camel@jlt3.sipsolutions.net>
CMD_SYNC is zero so the if (cmd->flags & CMD_SYNC) is never true and we
never check the assertion.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: enables the assertion even more than v1 (based on feedback from
Johannes Berg).
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index e55ec6c..5c04895 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1259,7 +1259,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
* the mutex, this ensures we don't try to send two
* (or more) synchronous commands at a time.
*/
- if (cmd->flags & CMD_SYNC)
+ if (!(cmd->flags & CMD_ASYNC))
lockdep_assert_held(&priv->mutex);
if (priv->ucode_owner = IWL_OWNERSHIP_TM &&
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Berg <johannes.berg@intel.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>,
Intel Linux Wireless <ilw@linux.intel.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch v2] iwlwifi: turn on a lockdep assertion
Date: Sun, 10 Jun 2012 14:25:22 +0300 [thread overview]
Message-ID: <20120610112521.GA20676@elgon.mountain> (raw)
In-Reply-To: <1339265576.5029.1.camel@jlt3.sipsolutions.net>
CMD_SYNC is zero so the if (cmd->flags & CMD_SYNC) is never true and we
never check the assertion.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: enables the assertion even more than v1 (based on feedback from
Johannes Berg).
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index e55ec6c..5c04895 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1259,7 +1259,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
* the mutex, this ensures we don't try to send two
* (or more) synchronous commands at a time.
*/
- if (cmd->flags & CMD_SYNC)
+ if (!(cmd->flags & CMD_ASYNC))
lockdep_assert_held(&priv->mutex);
if (priv->ucode_owner == IWL_OWNERSHIP_TM &&
next prev parent reply other threads:[~2012-06-10 11:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 15:57 [patch] iwlwifi: turn on a lockdep assertion Dan Carpenter
2012-06-09 15:57 ` Dan Carpenter
2012-06-09 18:12 ` Johannes Berg
2012-06-09 18:12 ` Johannes Berg
2012-06-09 19:07 ` Dan Carpenter
2012-06-09 19:07 ` Dan Carpenter
2012-06-10 11:25 ` Dan Carpenter [this message]
2012-06-10 11:25 ` [patch v2] " Dan Carpenter
2012-06-10 15:25 ` walter harms
2012-06-10 15:25 ` walter harms
2012-06-10 15:39 ` Dan Carpenter
2012-06-10 15:39 ` Dan Carpenter
2012-06-11 6:56 ` Johannes Berg
2012-06-11 6:56 ` Johannes Berg
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=20120610112521.GA20676@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=ilw@linux.intel.com \
--cc=johannes.berg@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=wey-yi.w.guy@intel.com \
/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.