iwlwifi: remove unused parameter from grab_nic_access
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 17 Dec 2015 09:55:13 +0000 (11:55 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 21 Dec 2015 08:11:39 +0000 (10:11 +0200)
All the callers used silent = false.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/main.c
drivers/net/wireless/intel/iwlwifi/dvm/tt.c
drivers/net/wireless/intel/iwlwifi/iwl-io.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c
drivers/net/wireless/intel/iwlwifi/pcie/tx.c

index 94bc66adef2f8a575e644b7fd741bc4bf6fac4f3..f62c2d727ddb52199c0cd9b3cb5066e38f2956a4 100644 (file)
@@ -429,7 +429,7 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base,
                ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32));
 
        /* Make sure device is powered up for SRAM reads */
-       if (!iwl_trans_grab_nic_access(priv->trans, false, &reg_flags))
+       if (!iwl_trans_grab_nic_access(priv->trans, &reg_flags))
                return;
 
        /* Set starting address; reads will auto-increment */
@@ -1731,7 +1731,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
        ptr = base + EVENT_START_OFFSET + (start_idx * event_size);
 
        /* Make sure device is powered up for SRAM reads */
-       if (!iwl_trans_grab_nic_access(trans, false, &reg_flags))
+       if (!iwl_trans_grab_nic_access(trans, &reg_flags))
                return pos;
 
        /* Set starting address; reads will auto-increment */
index 7decfc5677c644d7e71389104e9b3a77db0ba3df..5b73492e7ff71d9041ed12c613069f5925558821 100644 (file)
@@ -184,7 +184,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data)
                        priv->thermal_throttle.ct_kill_toggle = true;
                }
                iwl_read32(priv->trans, CSR_UCODE_DRV_GP1);
-               if (iwl_trans_grab_nic_access(priv->trans, false, &flags))
+               if (iwl_trans_grab_nic_access(priv->trans, &flags))
                        iwl_trans_release_nic_access(priv->trans, &flags);
 
                /* Reschedule the ct_kill timer to occur in
index 07ad5c80e6ae7df51b1150b6503a10b9839aabb4..32c8f84ae51906b4dfd1e46d476218c5b9a254b5 100644 (file)
@@ -82,7 +82,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg)
 {
        u32 value = 0x5a5a5a5a;
        unsigned long flags;
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                value = iwl_read32(trans, reg);
                iwl_trans_release_nic_access(trans, &flags);
        }
@@ -95,7 +95,7 @@ void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value)
 {
        unsigned long flags;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write32(trans, reg, value);
                iwl_trans_release_nic_access(trans, &flags);
        }
@@ -138,7 +138,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs)
        unsigned long flags;
        u32 val = 0x5a5a5a5a;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                val = iwl_read_prph_no_grab(trans, ofs);
                iwl_trans_release_nic_access(trans, &flags);
        }
@@ -150,7 +150,7 @@ void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val)
 {
        unsigned long flags;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write_prph_no_grab(trans, ofs, val);
                iwl_trans_release_nic_access(trans, &flags);
        }
@@ -176,7 +176,7 @@ void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
 {
        unsigned long flags;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write_prph_no_grab(trans, ofs,
                                       iwl_read_prph_no_grab(trans, ofs) |
                                       mask);
@@ -190,7 +190,7 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
 {
        unsigned long flags;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write_prph_no_grab(trans, ofs,
                                       (iwl_read_prph_no_grab(trans, ofs) &
                                        mask) | bits);
@@ -204,7 +204,7 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
        unsigned long flags;
        u32 val;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                val = iwl_read_prph_no_grab(trans, ofs);
                iwl_write_prph_no_grab(trans, ofs, (val & ~mask));
                iwl_trans_release_nic_access(trans, &flags);
index 43a48746d73192a5c5997eac0c9fb5273ca8a3fc..290d538a3190180ac05b75ab1befa5b0a33a97a5 100644 (file)
@@ -652,8 +652,7 @@ struct iwl_trans_ops {
        void (*configure)(struct iwl_trans *trans,
                          const struct iwl_trans_config *trans_cfg);
        void (*set_pmi)(struct iwl_trans *trans, bool state);
-       bool (*grab_nic_access)(struct iwl_trans *trans, bool silent,
-                               unsigned long *flags);
+       bool (*grab_nic_access)(struct iwl_trans *trans, unsigned long *flags);
        void (*release_nic_access)(struct iwl_trans *trans,
                                   unsigned long *flags);
        void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask,
@@ -1170,9 +1169,9 @@ iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value)
        trans->ops->set_bits_mask(trans, reg, mask, value);
 }
 
-#define iwl_trans_grab_nic_access(trans, silent, flags)        \
+#define iwl_trans_grab_nic_access(trans, flags)        \
        __cond_lock(nic_access,                         \
-                   likely((trans)->ops->grab_nic_access(trans, silent, flags)))
+                   likely((trans)->ops->grab_nic_access(trans, flags)))
 
 static inline void __releases(nic_access)
 iwl_trans_release_nic_access(struct iwl_trans *trans, unsigned long *flags)
index 29d54ec8ebea7fa0fa62b3cddf8842070354c82d..f406c76b430247fa134a5f7114a499677d6b39d0 100644 (file)
@@ -122,7 +122,7 @@ static void iwl_mvm_dump_fifos(struct iwl_mvm *mvm,
        unsigned long flags;
        int i, j;
 
-       if (!iwl_trans_grab_nic_access(mvm->trans, false, &flags))
+       if (!iwl_trans_grab_nic_access(mvm->trans, &flags))
                return;
 
        /* Pull RXF data from all RXFs */
@@ -359,7 +359,7 @@ static u32 iwl_dump_prph(struct iwl_trans *trans,
        unsigned long flags;
        u32 prph_len = 0, i;
 
-       if (!iwl_trans_grab_nic_access(trans, false, &flags))
+       if (!iwl_trans_grab_nic_access(trans, &flags))
                return 0;
 
        for (i = 0; i < ARRAY_SIZE(iwl_prph_dump_addr); i++) {
index e8041907e7e215767230d13e343f6da2d6e839ff..d44e7afad593f96dd67fde7005f8d5d8eeab86ea 100644 (file)
@@ -1505,8 +1505,8 @@ static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
                clear_bit(STATUS_TPOWER_PMI, &trans->status);
 }
 
-static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
-                                               unsigned long *flags)
+static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans,
+                                          unsigned long *flags)
 {
        int ret;
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
@@ -1547,14 +1547,11 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
                            CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
        if (unlikely(ret < 0)) {
                iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI);
-               if (!silent) {
-                       u32 val = iwl_read32(trans, CSR_GP_CNTRL);
-                       WARN_ONCE(1,
-                                 "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
-                                 val);
-                       spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
-                       return false;
-               }
+               WARN_ONCE(1,
+                         "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
+                         iwl_read32(trans, CSR_GP_CNTRL));
+               spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
+               return false;
        }
 
 out:
@@ -1602,7 +1599,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
        int offs, ret = 0;
        u32 *vals = buf;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr);
                for (offs = 0; offs < dwords; offs++)
                        vals[offs] = iwl_read32(trans, HBUS_TARG_MEM_RDAT);
@@ -1620,7 +1617,7 @@ static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr,
        int offs, ret = 0;
        const u32 *vals = buf;
 
-       if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+       if (iwl_trans_grab_nic_access(trans, &flags)) {
                iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);
                for (offs = 0; offs < dwords; offs++)
                        iwl_write32(trans, HBUS_TARG_MEM_WDAT,
@@ -2246,7 +2243,7 @@ static u32 iwl_trans_pcie_fh_regs_dump(struct iwl_trans *trans,
        __le32 *val;
        int i;
 
-       if (!iwl_trans_grab_nic_access(trans, false, &flags))
+       if (!iwl_trans_grab_nic_access(trans, &flags))
                return 0;
 
        (*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FH_REGS);
@@ -2273,7 +2270,7 @@ iwl_trans_pci_dump_marbh_monitor(struct iwl_trans *trans,
        unsigned long flags;
        u32 i;
 
-       if (!iwl_trans_grab_nic_access(trans, false, &flags))
+       if (!iwl_trans_grab_nic_access(trans, &flags))
                return 0;
 
        iwl_write_prph_no_grab(trans, MON_DMARB_RD_CTL_ADDR, 0x1);
@@ -2658,7 +2655,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
                        goto out_pci_disable_msi;
                }
 
-               if (iwl_trans_grab_nic_access(trans, false, &flags)) {
+               if (iwl_trans_grab_nic_access(trans, &flags)) {
                        u32 hw_step;
 
                        hw_step = iwl_read_prph_no_grab(trans, WFPM_CTRL_REG);
index a85ae1002d97ae4f5e2615c385e4355da3d70b06..5262028b55055e4ca9243e8d27fee38bd9769f0e 100644 (file)
@@ -770,7 +770,7 @@ static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans)
 
        spin_lock(&trans_pcie->irq_lock);
 
-       if (!iwl_trans_grab_nic_access(trans, false, &flags))
+       if (!iwl_trans_grab_nic_access(trans, &flags))
                goto out;
 
        /* Stop each Tx DMA channel */