diff options
author | David S. Miller <davem@davemloft.net> | 2016-06-29 07:53:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-29 07:53:42 -0400 |
commit | c973f24d370c919d357e45e9c6ca69a0717d81b7 (patch) | |
tree | d35a53b16913e9a1550e217a3d60c8ada7433556 | |
parent | fb773e975e80a04cb7c0cfd0c1aea2dca095e968 (diff) | |
parent | d2890dea2984749f59bfeffaff7add9030326542 (diff) |
Merge branch 'qed-static-checker'
Sudarsana Reddy Kalluru says:
====================
qed*: Fix the static checker warnings.
The patch series addresses the static checker warnings introduced by the
earlier patches related to qed/qede coalesce configuration support.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/ethernet/qlogic/qed/qed.h index 9a63df1184f1..35e53771533f 100644 --- a/drivers/net/ethernet/qlogic/qed/qed.h +++ b/drivers/net/ethernet/qlogic/qed/qed.h | |||
@@ -489,8 +489,8 @@ struct qed_dev { | |||
489 | 489 | ||
490 | u32 int_mode; | 490 | u32 int_mode; |
491 | enum qed_coalescing_mode int_coalescing_mode; | 491 | enum qed_coalescing_mode int_coalescing_mode; |
492 | u8 rx_coalesce_usecs; | 492 | u16 rx_coalesce_usecs; |
493 | u8 tx_coalesce_usecs; | 493 | u16 tx_coalesce_usecs; |
494 | 494 | ||
495 | /* Start Bar offset of first hwfn */ | 495 | /* Start Bar offset of first hwfn */ |
496 | void __iomem *regview; | 496 | void __iomem *regview; |
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c index 6228482bf7f0..c5c658ab0724 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c +++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c | |||
@@ -430,11 +430,13 @@ static int qede_get_coalesce(struct net_device *dev, | |||
430 | struct ethtool_coalesce *coal) | 430 | struct ethtool_coalesce *coal) |
431 | { | 431 | { |
432 | struct qede_dev *edev = netdev_priv(dev); | 432 | struct qede_dev *edev = netdev_priv(dev); |
433 | u16 rxc, txc; | ||
433 | 434 | ||
434 | memset(coal, 0, sizeof(struct ethtool_coalesce)); | 435 | memset(coal, 0, sizeof(struct ethtool_coalesce)); |
435 | edev->ops->common->get_coalesce(edev->cdev, | 436 | edev->ops->common->get_coalesce(edev->cdev, &rxc, &txc); |
436 | (u16 *)&coal->rx_coalesce_usecs, | 437 | |
437 | (u16 *)&coal->tx_coalesce_usecs); | 438 | coal->rx_coalesce_usecs = rxc; |
439 | coal->tx_coalesce_usecs = txc; | ||
438 | 440 | ||
439 | return 0; | 441 | return 0; |
440 | } | 442 | } |