Commit 888506a9 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-gcc60-fixes'

Arnd Bergmann says:

====================
net: gcc-6.0 warning fixes

I've just installed gcc-6.0 to see what kinds of new warnings
we get. It turns out that it's actually really useful once I
disabled -Wunused-const-variable, and all of the warnings it
found in network drivers seem valid.

Sorry for the bad timing in the merge window, but I figured
it would be better to send the fixes as I found the bugs
rather than waiting for the next cycle. The first three
look appropriate for stable backports.

The other two only fix a gcc warning about incorrect whitespace,
probably not worth backporting those.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 916848ca 8e0cc8c3
...@@ -3141,7 +3141,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev, ...@@ -3141,7 +3141,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
case QP_TRANS_RTS2RTS: case QP_TRANS_RTS2RTS:
case QP_TRANS_SQD2SQD: case QP_TRANS_SQD2SQD:
case QP_TRANS_SQD2RTS: case QP_TRANS_SQD2RTS:
if (slave != mlx4_master_func_num(dev)) if (slave != mlx4_master_func_num(dev)) {
if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) { if (optpar & MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH) {
port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1; port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB) if (dev->caps.port_mask[port] != MLX4_PORT_TYPE_IB)
...@@ -3160,6 +3160,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev, ...@@ -3160,6 +3160,7 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
if (qp_ctx->alt_path.mgid_index >= num_gids) if (qp_ctx->alt_path.mgid_index >= num_gids)
return -EINVAL; return -EINVAL;
} }
}
break; break;
default: default:
break; break;
......
...@@ -2516,7 +2516,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2516,7 +2516,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->mem_start = card->phys_mem dev->mem_start = card->phys_mem
+ BUF_OFFSET ( txBuffer[i][0][0]); + BUF_OFFSET ( txBuffer[i][0][0]);
dev->mem_end = card->phys_mem dev->mem_end = card->phys_mem
+ BUF_OFFSET ( txBuffer[i][NUM_TX_BUFFER][0]); + BUF_OFFSET ( txBuffer[i][NUM_TX_BUFFER - 1][LEN_RX_BUFFER - 1]);
dev->base_addr = card->pci_conf; dev->base_addr = card->pci_conf;
dev->irq = card->irq; dev->irq = card->irq;
......
...@@ -477,10 +477,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, ...@@ -477,10 +477,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
if (match) { if (match) {
if (AR_SREV_9287(ah)) { if (AR_SREV_9287(ah)) {
/* FIXME: array overrun? */
for (i = 0; i < numXpdGains; i++) { for (i = 0; i < numXpdGains; i++) {
minPwrT4[i] = data_9287[idxL].pwrPdg[i][0]; minPwrT4[i] = data_9287[idxL].pwrPdg[i][0];
maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4]; maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1];
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
data_9287[idxL].pwrPdg[i], data_9287[idxL].pwrPdg[i],
data_9287[idxL].vpdPdg[i], data_9287[idxL].vpdPdg[i],
...@@ -490,7 +489,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, ...@@ -490,7 +489,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
} else if (eeprom_4k) { } else if (eeprom_4k) {
for (i = 0; i < numXpdGains; i++) { for (i = 0; i < numXpdGains; i++) {
minPwrT4[i] = data_4k[idxL].pwrPdg[i][0]; minPwrT4[i] = data_4k[idxL].pwrPdg[i][0];
maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4]; maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1];
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
data_4k[idxL].pwrPdg[i], data_4k[idxL].pwrPdg[i],
data_4k[idxL].vpdPdg[i], data_4k[idxL].vpdPdg[i],
...@@ -500,7 +499,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, ...@@ -500,7 +499,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah,
} else { } else {
for (i = 0; i < numXpdGains; i++) { for (i = 0; i < numXpdGains; i++) {
minPwrT4[i] = data_def[idxL].pwrPdg[i][0]; minPwrT4[i] = data_def[idxL].pwrPdg[i][0];
maxPwrT4[i] = data_def[idxL].pwrPdg[i][4]; maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1];
ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i],
data_def[idxL].pwrPdg[i], data_def[idxL].pwrPdg[i],
data_def[idxL].vpdPdg[i], data_def[idxL].vpdPdg[i],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment