aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller2016-06-29 07:53:42 -0400
committerDavid S. Miller2016-06-29 07:53:42 -0400
commitc973f24d370c919d357e45e9c6ca69a0717d81b7 (patch)
treed35a53b16913e9a1550e217a3d60c8ada7433556
parentfb773e975e80a04cb7c0cfd0c1aea2dca095e968 (diff)
parentd2890dea2984749f59bfeffaff7add9030326542 (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.h4
-rw-r--r--drivers/net/ethernet/qlogic/qede/qede_ethtool.c8
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 {
u32 int_mode;
enum qed_coalescing_mode int_coalescing_mode;
- u8 rx_coalesce_usecs;
- u8 tx_coalesce_usecs;
+ u16 rx_coalesce_usecs;
+ u16 tx_coalesce_usecs;
/* Start Bar offset of first hwfn */
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,
struct ethtool_coalesce *coal)
{
struct qede_dev *edev = netdev_priv(dev);
+ u16 rxc, txc;
memset(coal, 0, sizeof(struct ethtool_coalesce));
- edev->ops->common->get_coalesce(edev->cdev,
- (u16 *)&coal->rx_coalesce_usecs,
- (u16 *)&coal->tx_coalesce_usecs);
+ edev->ops->common->get_coalesce(edev->cdev, &rxc, &txc);
+
+ coal->rx_coalesce_usecs = rxc;
+ coal->tx_coalesce_usecs = txc;
return 0;
}