ixgbe: fix variable set but not used warnings by gcc 4.6
Caught with gcc 4.6 -Wunused-but-set-variable Remove unused napi_vectors variable. Fix the use of reset_bit in ixgbe_reset_hw_X540() Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
cf8e09b06d
commit
2c4db944a2
2 changed files with 3 additions and 6 deletions
|
@ -4863,16 +4863,13 @@ static int ixgbe_alloc_q_vectors(struct ixgbe_adapter *adapter)
|
||||||
{
|
{
|
||||||
int q_idx, num_q_vectors;
|
int q_idx, num_q_vectors;
|
||||||
struct ixgbe_q_vector *q_vector;
|
struct ixgbe_q_vector *q_vector;
|
||||||
int napi_vectors;
|
|
||||||
int (*poll)(struct napi_struct *, int);
|
int (*poll)(struct napi_struct *, int);
|
||||||
|
|
||||||
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
|
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
|
||||||
num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
|
num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS;
|
||||||
napi_vectors = adapter->num_rx_queues;
|
|
||||||
poll = &ixgbe_clean_rxtx_many;
|
poll = &ixgbe_clean_rxtx_many;
|
||||||
} else {
|
} else {
|
||||||
num_q_vectors = 1;
|
num_q_vectors = 1;
|
||||||
napi_vectors = 1;
|
|
||||||
poll = &ixgbe_poll;
|
poll = &ixgbe_poll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,17 +133,17 @@ static s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw)
|
||||||
}
|
}
|
||||||
|
|
||||||
ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
|
ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_CTRL, (ctrl | IXGBE_CTRL_RST));
|
IXGBE_WRITE_REG(hw, IXGBE_CTRL, (ctrl | reset_bit));
|
||||||
IXGBE_WRITE_FLUSH(hw);
|
IXGBE_WRITE_FLUSH(hw);
|
||||||
|
|
||||||
/* Poll for reset bit to self-clear indicating reset is complete */
|
/* Poll for reset bit to self-clear indicating reset is complete */
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
udelay(1);
|
udelay(1);
|
||||||
ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
|
ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL);
|
||||||
if (!(ctrl & IXGBE_CTRL_RST))
|
if (!(ctrl & reset_bit))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ctrl & IXGBE_CTRL_RST) {
|
if (ctrl & reset_bit) {
|
||||||
status = IXGBE_ERR_RESET_FAILED;
|
status = IXGBE_ERR_RESET_FAILED;
|
||||||
hw_dbg(hw, "Reset polling failed to complete.\n");
|
hw_dbg(hw, "Reset polling failed to complete.\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue