iwlwifi : fix checkpatch.pl errors
Abhijeet Kolekar [Wed, 12 Nov 2008 21:14:08 +0000 (13:14 -0800)]
Patch fixes checkpatch.pl errors for iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

drivers/net/wireless/iwlwifi/iwl-3945-io.h
drivers/net/wireless/iwlwifi/iwl-4965.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-hcmd.c
drivers/net/wireless/iwlwifi/iwl-io.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 1daa3f0..7dea155 100644 (file)
@@ -107,7 +107,7 @@ static inline int __iwl3945_poll_bit(const char *f, u32 l,
        int ret = _iwl3945_poll_bit(priv, addr, bits, mask, timeout);
        IWL_DEBUG_IO("poll_bit(0x%08X, 0x%08X, 0x%08X) - %s- %s %d\n",
                      addr, bits, mask,
-                     unlikely(ret  == -ETIMEDOUT)?"timeout":"", f, l);
+                     unlikely(ret  == -ETIMEDOUT) ? "timeout" : "", f, l);
        return ret;
 }
 #define iwl3945_poll_bit(priv, addr, bits, mask, timeout) \
index 17f4098..9007ff2 100644 (file)
@@ -661,7 +661,7 @@ static void iwl4965_tx_queue_set_status(struct iwl_priv *priv,
        int txq_id = txq->q.id;
 
        /* Find out whether to activate Tx queue */
-       int active = test_bit(txq_id, &priv->txq_ctx_active_msk)?1:0;
+       int active = test_bit(txq_id, &priv->txq_ctx_active_msk) ? 1 : 0;
 
        /* Set up and activate */
        iwl_write_prph(priv, IWL49_SCD_QUEUE_STATUS_BITS(txq_id),
@@ -2025,7 +2025,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
                info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
                info->status.rates[0].count = tx_resp->failure_frame + 1;
                info->flags &= ~IEEE80211_TX_CTL_AMPDU;
-               info->flags |= iwl_is_tx_success(status)?
+               info->flags |= iwl_is_tx_success(status) ?
                        IEEE80211_TX_STAT_ACK : 0;
                iwl_hwrate_to_tx_control(priv, rate_n_flags, info);
                /* FIXME: code repetition end */
index b6d7e91..aeb69ee 100644 (file)
@@ -1111,7 +1111,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
                info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
                info->status.rates[0].count = tx_resp->failure_frame + 1;
                info->flags &= ~IEEE80211_TX_CTL_AMPDU;
-               info->flags |= iwl_is_tx_success(status)?
+               info->flags |= iwl_is_tx_success(status) ?
                                        IEEE80211_TX_STAT_ACK : 0;
                iwl_hwrate_to_tx_control(priv, rate_n_flags, info);
 
index d8ac45d..3a2b812 100644 (file)
@@ -2515,7 +2515,7 @@ static ssize_t rs_sta_dbgfs_stats_table_read(struct file *file,
        for (i = 0; i < LQ_SIZE; i++) {
                desc += sprintf(buff+desc, "%s type=%d SGI=%d FAT=%d DUP=%d\n"
                                "rate=0x%X\n",
-                               lq_sta->active_tbl == i?"*":"x",
+                               lq_sta->active_tbl == i ? "*" : "x",
                                lq_sta->lq_info[i].lq_type,
                                lq_sta->lq_info[i].is_SGI,
                                lq_sta->lq_info[i].is_fat,
index ab599a9..e971a89 100644 (file)
@@ -1492,7 +1492,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
                        hw_rf_kill = 1;
 
                IWL_DEBUG(IWL_DL_RF_KILL, "RF_KILL bit toggled to %s.\n",
-                               hw_rf_kill ? "disable radio":"enable radio");
+                               hw_rf_kill ? "disable radio" : "enable radio");
 
                /* driver only loads ucode once setting the interface up.
                 * the driver as well won't allow loading if RFKILL is set
@@ -3657,7 +3657,8 @@ static ssize_t show_power_level(struct device *d,
                break;
        }
 
-       p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO)?"fixed":"auto");
+       p += sprintf(p, "\tMODE:%s", (mode < IWL_POWER_AUTO) ?
+                       "fixed" : "auto");
        p += sprintf(p, "\tINDEX:%d", level);
        p += sprintf(p, "\n");
        return p - buf + 1;
index 8300f3d..0008a35 100644 (file)
@@ -36,7 +36,7 @@
 #include "iwl-core.h"
 
 
-#define IWL_CMD(x) case x : return #x
+#define IWL_CMD(x) case x: return #x
 
 const char *get_cmd_string(u8 cmd)
 {
index 40e0050..bc10435 100644 (file)
@@ -109,7 +109,7 @@ static inline int __iwl_poll_bit(const char *f, u32 l,
        int ret = _iwl_poll_bit(priv, addr, bits, mask, timeout);
        IWL_DEBUG_IO("poll_bit(0x%08X, 0x%08X, 0x%08X) - %s- %s %d\n",
                     addr, bits, mask,
-                    unlikely(ret  == -ETIMEDOUT)?"timeout":"", f, l);
+                    unlikely(ret  == -ETIMEDOUT) ? "timeout" : "", f, l);
        return ret;
 }
 #define iwl_poll_bit(priv, addr, bits, mask, timeout) \
index 166f000..d9638d7 100644 (file)
@@ -1498,7 +1498,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
                ack = bitmap & (1ULL << i);
                successes += !!ack;
                IWL_DEBUG_TX_REPLY("%s ON i=%d idx=%d raw=%d\n",
-                       ack? "ACK":"NACK", i, (agg->start_idx + i) & 0xff,
+                       ack ? "ACK" : "NACK", i, (agg->start_idx + i) & 0xff,
                        agg->start_idx + i);
        }
 
index 1a923c2..baa0d6c 100644 (file)
@@ -519,7 +519,7 @@ static inline int iwl3945_is_ready_rf(struct iwl3945_priv *priv)
 
 /*************** HOST COMMAND QUEUE FUNCTIONS   *****/
 
-#define IWL_CMD(x) case x : return #x
+#define IWL_CMD(x) case x: return #x
 
 static const char *get_cmd_string(u8 cmd)
 {
@@ -4320,7 +4320,7 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
 
                IWL_DEBUG(IWL_DL_INFO | IWL_DL_RF_KILL | IWL_DL_ISR,
                                "RF_KILL bit toggled to %s.\n",
-                               hw_rf_kill ? "disable radio":"enable radio");
+                               hw_rf_kill ? "disable radio" : "enable radio");
 
                /* Queue restart only if RF_KILL switch was set to "kill"
                 *   when we loaded driver, and is now set to "enable".