linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iwlwifi: turn on a lockdep assertion
@ 2012-06-09 15:57 Dan Carpenter
  2012-06-09 18:12 ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Carpenter @ 2012-06-09 15:57 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Wey-Yi Guy, Intel Linux Wireless, John W. Linville,
	linux-wireless, kernel-janitors

CMD_SYNC is zero so the if (cmd->flags & CMD_SYNC) is never true.  I
think it should be if (cmd->flags == CMD_SYNC).  This enables a lockdep
assertion.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index e55ec6c..c5ccdfa 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_SYNC)
 		lockdep_assert_held(&priv->mutex);
 
 	if (priv->ucode_owner == IWL_OWNERSHIP_TM &&

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-11  6:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-09 15:57 [patch] iwlwifi: turn on a lockdep assertion Dan Carpenter
2012-06-09 18:12 ` Johannes Berg
2012-06-09 19:07   ` Dan Carpenter
2012-06-10 11:25   ` [patch v2] " Dan Carpenter
2012-06-10 15:25     ` walter harms
2012-06-10 15:39       ` Dan Carpenter
2012-06-11  6:56     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).