iwlwifi: pcie: move warning message into warning
authorJohannes Berg <johannes.berg@intel.com>
Mon, 28 Oct 2013 14:50:55 +0000 (15:50 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 29 Oct 2013 13:51:50 +0000 (14:51 +0100)
Having a WARN_ON() followed by a printed message is
less useful than having the message in the warning
so move the message.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/pcie/tx.c

index b4168415538c592ea9dd84ab4e8006eceeb1fc56..cc184402b88a658f27ab54899ae7fb35e1122ee2 100644 (file)
@@ -1495,12 +1495,11 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
        IWL_DEBUG_INFO(trans, "Attempting to send sync command %s\n",
                       get_cmd_string(trans_pcie, cmd->id));
 
-       if (WARN_ON(test_and_set_bit(STATUS_HCMD_ACTIVE,
-                                    &trans_pcie->status))) {
-               IWL_ERR(trans, "Command %s: a command is already active!\n",
-                       get_cmd_string(trans_pcie, cmd->id));
+       if (WARN(test_and_set_bit(STATUS_HCMD_ACTIVE,
+                                 &trans_pcie->status),
+                "Command %s: a command is already active!\n",
+                get_cmd_string(trans_pcie, cmd->id)))
                return -EIO;
-       }
 
        IWL_DEBUG_INFO(trans, "Setting HCMD_ACTIVE for command %s\n",
                       get_cmd_string(trans_pcie, cmd->id));