diff options
author | Joe Perches <joe@perches.com> | 2010-11-15 06:12:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-17 13:37:51 -0500 |
commit | 5f54cebb13cdb8dcd85036f8bee29f14db18b6e1 (patch) | |
tree | 4f40aa2ce399081f47dc86c188bdd33c15972599 /drivers/net/vxge | |
parent | 8739cfef1ab8bc02e1bf38c02399afe62f3a7800 (diff) |
drivers/net/vxge: Remove unnecessary casts of netdev_priv
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxge')
-rw-r--r-- | drivers/net/vxge/vxge-ethtool.c | 26 | ||||
-rw-r--r-- | drivers/net/vxge/vxge-main.c | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/vxge/vxge-ethtool.c b/drivers/net/vxge/vxge-ethtool.c index 09f721e10517..bc9bd1035706 100644 --- a/drivers/net/vxge/vxge-ethtool.c +++ b/drivers/net/vxge/vxge-ethtool.c | |||
@@ -80,7 +80,7 @@ static int vxge_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) | |||
80 | static void vxge_ethtool_gdrvinfo(struct net_device *dev, | 80 | static void vxge_ethtool_gdrvinfo(struct net_device *dev, |
81 | struct ethtool_drvinfo *info) | 81 | struct ethtool_drvinfo *info) |
82 | { | 82 | { |
83 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 83 | struct vxgedev *vdev = netdev_priv(dev); |
84 | strlcpy(info->driver, VXGE_DRIVER_NAME, sizeof(VXGE_DRIVER_NAME)); | 84 | strlcpy(info->driver, VXGE_DRIVER_NAME, sizeof(VXGE_DRIVER_NAME)); |
85 | strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION)); | 85 | strlcpy(info->version, DRV_VERSION, sizeof(DRV_VERSION)); |
86 | strlcpy(info->fw_version, vdev->fw_version, VXGE_HW_FW_STRLEN); | 86 | strlcpy(info->fw_version, vdev->fw_version, VXGE_HW_FW_STRLEN); |
@@ -108,7 +108,7 @@ static void vxge_ethtool_gregs(struct net_device *dev, | |||
108 | enum vxge_hw_status status; | 108 | enum vxge_hw_status status; |
109 | u64 reg; | 109 | u64 reg; |
110 | u64 *reg_space = (u64 *)space; | 110 | u64 *reg_space = (u64 *)space; |
111 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 111 | struct vxgedev *vdev = netdev_priv(dev); |
112 | struct __vxge_hw_device *hldev = vdev->devh; | 112 | struct __vxge_hw_device *hldev = vdev->devh; |
113 | 113 | ||
114 | regs->len = sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; | 114 | regs->len = sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; |
@@ -144,7 +144,7 @@ static void vxge_ethtool_gregs(struct net_device *dev, | |||
144 | */ | 144 | */ |
145 | static int vxge_ethtool_idnic(struct net_device *dev, u32 data) | 145 | static int vxge_ethtool_idnic(struct net_device *dev, u32 data) |
146 | { | 146 | { |
147 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 147 | struct vxgedev *vdev = netdev_priv(dev); |
148 | struct __vxge_hw_device *hldev = vdev->devh; | 148 | struct __vxge_hw_device *hldev = vdev->devh; |
149 | 149 | ||
150 | vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON); | 150 | vxge_hw_device_flick_link_led(hldev, VXGE_FLICKER_ON); |
@@ -166,7 +166,7 @@ static int vxge_ethtool_idnic(struct net_device *dev, u32 data) | |||
166 | static void vxge_ethtool_getpause_data(struct net_device *dev, | 166 | static void vxge_ethtool_getpause_data(struct net_device *dev, |
167 | struct ethtool_pauseparam *ep) | 167 | struct ethtool_pauseparam *ep) |
168 | { | 168 | { |
169 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 169 | struct vxgedev *vdev = netdev_priv(dev); |
170 | struct __vxge_hw_device *hldev = vdev->devh; | 170 | struct __vxge_hw_device *hldev = vdev->devh; |
171 | 171 | ||
172 | vxge_hw_device_getpause_data(hldev, 0, &ep->tx_pause, &ep->rx_pause); | 172 | vxge_hw_device_getpause_data(hldev, 0, &ep->tx_pause, &ep->rx_pause); |
@@ -185,7 +185,7 @@ static void vxge_ethtool_getpause_data(struct net_device *dev, | |||
185 | static int vxge_ethtool_setpause_data(struct net_device *dev, | 185 | static int vxge_ethtool_setpause_data(struct net_device *dev, |
186 | struct ethtool_pauseparam *ep) | 186 | struct ethtool_pauseparam *ep) |
187 | { | 187 | { |
188 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 188 | struct vxgedev *vdev = netdev_priv(dev); |
189 | struct __vxge_hw_device *hldev = vdev->devh; | 189 | struct __vxge_hw_device *hldev = vdev->devh; |
190 | 190 | ||
191 | vxge_hw_device_setpause_data(hldev, 0, ep->tx_pause, ep->rx_pause); | 191 | vxge_hw_device_setpause_data(hldev, 0, ep->tx_pause, ep->rx_pause); |
@@ -203,7 +203,7 @@ static void vxge_get_ethtool_stats(struct net_device *dev, | |||
203 | enum vxge_hw_status status; | 203 | enum vxge_hw_status status; |
204 | enum vxge_hw_status swstatus; | 204 | enum vxge_hw_status swstatus; |
205 | struct vxge_vpath *vpath = NULL; | 205 | struct vxge_vpath *vpath = NULL; |
206 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 206 | struct vxgedev *vdev = netdev_priv(dev); |
207 | struct __vxge_hw_device *hldev = vdev->devh; | 207 | struct __vxge_hw_device *hldev = vdev->devh; |
208 | struct vxge_hw_xmac_stats *xmac_stats; | 208 | struct vxge_hw_xmac_stats *xmac_stats; |
209 | struct vxge_hw_device_stats_sw_info *sw_stats; | 209 | struct vxge_hw_device_stats_sw_info *sw_stats; |
@@ -572,7 +572,7 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset, | |||
572 | { | 572 | { |
573 | int stat_size = 0; | 573 | int stat_size = 0; |
574 | int i, j; | 574 | int i, j; |
575 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 575 | struct vxgedev *vdev = netdev_priv(dev); |
576 | switch (stringset) { | 576 | switch (stringset) { |
577 | case ETH_SS_STATS: | 577 | case ETH_SS_STATS: |
578 | vxge_add_string("VPATH STATISTICS%s\t\t\t", | 578 | vxge_add_string("VPATH STATISTICS%s\t\t\t", |
@@ -1059,21 +1059,21 @@ static void vxge_ethtool_get_strings(struct net_device *dev, u32 stringset, | |||
1059 | 1059 | ||
1060 | static int vxge_ethtool_get_regs_len(struct net_device *dev) | 1060 | static int vxge_ethtool_get_regs_len(struct net_device *dev) |
1061 | { | 1061 | { |
1062 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1062 | struct vxgedev *vdev = netdev_priv(dev); |
1063 | 1063 | ||
1064 | return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; | 1064 | return sizeof(struct vxge_hw_vpath_reg) * vdev->no_of_vpath; |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | static u32 vxge_get_rx_csum(struct net_device *dev) | 1067 | static u32 vxge_get_rx_csum(struct net_device *dev) |
1068 | { | 1068 | { |
1069 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1069 | struct vxgedev *vdev = netdev_priv(dev); |
1070 | 1070 | ||
1071 | return vdev->rx_csum; | 1071 | return vdev->rx_csum; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static int vxge_set_rx_csum(struct net_device *dev, u32 data) | 1074 | static int vxge_set_rx_csum(struct net_device *dev, u32 data) |
1075 | { | 1075 | { |
1076 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1076 | struct vxgedev *vdev = netdev_priv(dev); |
1077 | 1077 | ||
1078 | if (data) | 1078 | if (data) |
1079 | vdev->rx_csum = 1; | 1079 | vdev->rx_csum = 1; |
@@ -1095,7 +1095,7 @@ static int vxge_ethtool_op_set_tso(struct net_device *dev, u32 data) | |||
1095 | 1095 | ||
1096 | static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) | 1096 | static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) |
1097 | { | 1097 | { |
1098 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1098 | struct vxgedev *vdev = netdev_priv(dev); |
1099 | 1099 | ||
1100 | switch (sset) { | 1100 | switch (sset) { |
1101 | case ETH_SS_STATS: | 1101 | case ETH_SS_STATS: |
@@ -1114,7 +1114,7 @@ static int vxge_ethtool_get_sset_count(struct net_device *dev, int sset) | |||
1114 | 1114 | ||
1115 | static int vxge_set_flags(struct net_device *dev, u32 data) | 1115 | static int vxge_set_flags(struct net_device *dev, u32 data) |
1116 | { | 1116 | { |
1117 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1117 | struct vxgedev *vdev = netdev_priv(dev); |
1118 | enum vxge_hw_status status; | 1118 | enum vxge_hw_status status; |
1119 | 1119 | ||
1120 | if (data & ~ETH_FLAG_RXHASH) | 1120 | if (data & ~ETH_FLAG_RXHASH) |
@@ -1148,7 +1148,7 @@ static int vxge_set_flags(struct net_device *dev, u32 data) | |||
1148 | 1148 | ||
1149 | static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms) | 1149 | static int vxge_fw_flash(struct net_device *dev, struct ethtool_flash *parms) |
1150 | { | 1150 | { |
1151 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 1151 | struct vxgedev *vdev = netdev_priv(dev); |
1152 | 1152 | ||
1153 | if (vdev->max_vpath_supported != VXGE_HW_MAX_VIRTUAL_PATHS) { | 1153 | if (vdev->max_vpath_supported != VXGE_HW_MAX_VIRTUAL_PATHS) { |
1154 | printk(KERN_INFO "Single Function Mode is required to flash the" | 1154 | printk(KERN_INFO "Single Function Mode is required to flash the" |
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 3f2d6ed13d3e..29f0ec88cfea 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c | |||
@@ -153,7 +153,7 @@ static void | |||
153 | vxge_callback_link_up(struct __vxge_hw_device *hldev) | 153 | vxge_callback_link_up(struct __vxge_hw_device *hldev) |
154 | { | 154 | { |
155 | struct net_device *dev = hldev->ndev; | 155 | struct net_device *dev = hldev->ndev; |
156 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 156 | struct vxgedev *vdev = netdev_priv(dev); |
157 | 157 | ||
158 | vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d", | 158 | vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d", |
159 | vdev->ndev->name, __func__, __LINE__); | 159 | vdev->ndev->name, __func__, __LINE__); |
@@ -177,7 +177,7 @@ static void | |||
177 | vxge_callback_link_down(struct __vxge_hw_device *hldev) | 177 | vxge_callback_link_down(struct __vxge_hw_device *hldev) |
178 | { | 178 | { |
179 | struct net_device *dev = hldev->ndev; | 179 | struct net_device *dev = hldev->ndev; |
180 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 180 | struct vxgedev *vdev = netdev_priv(dev); |
181 | 181 | ||
182 | vxge_debug_entryexit(VXGE_TRACE, | 182 | vxge_debug_entryexit(VXGE_TRACE, |
183 | "%s: %s:%d", vdev->ndev->name, __func__, __LINE__); | 183 | "%s: %s:%d", vdev->ndev->name, __func__, __LINE__); |
@@ -787,7 +787,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev) | |||
787 | return NETDEV_TX_OK; | 787 | return NETDEV_TX_OK; |
788 | } | 788 | } |
789 | 789 | ||
790 | vdev = (struct vxgedev *)netdev_priv(dev); | 790 | vdev = netdev_priv(dev); |
791 | 791 | ||
792 | if (unlikely(!is_vxge_card_up(vdev))) { | 792 | if (unlikely(!is_vxge_card_up(vdev))) { |
793 | vxge_debug_tx(VXGE_ERR, | 793 | vxge_debug_tx(VXGE_ERR, |
@@ -1052,7 +1052,7 @@ static void vxge_set_multicast(struct net_device *dev) | |||
1052 | vxge_debug_entryexit(VXGE_TRACE, | 1052 | vxge_debug_entryexit(VXGE_TRACE, |
1053 | "%s:%d", __func__, __LINE__); | 1053 | "%s:%d", __func__, __LINE__); |
1054 | 1054 | ||
1055 | vdev = (struct vxgedev *)netdev_priv(dev); | 1055 | vdev = netdev_priv(dev); |
1056 | hldev = (struct __vxge_hw_device *)vdev->devh; | 1056 | hldev = (struct __vxge_hw_device *)vdev->devh; |
1057 | 1057 | ||
1058 | if (unlikely(!is_vxge_card_up(vdev))) | 1058 | if (unlikely(!is_vxge_card_up(vdev))) |
@@ -1209,7 +1209,7 @@ static int vxge_set_mac_addr(struct net_device *dev, void *p) | |||
1209 | 1209 | ||
1210 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); | 1210 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); |
1211 | 1211 | ||
1212 | vdev = (struct vxgedev *)netdev_priv(dev); | 1212 | vdev = netdev_priv(dev); |
1213 | hldev = vdev->devh; | 1213 | hldev = vdev->devh; |
1214 | 1214 | ||
1215 | if (!is_valid_ether_addr(addr->sa_data)) | 1215 | if (!is_valid_ether_addr(addr->sa_data)) |
@@ -1672,7 +1672,7 @@ static void vxge_netpoll(struct net_device *dev) | |||
1672 | struct __vxge_hw_device *hldev; | 1672 | struct __vxge_hw_device *hldev; |
1673 | struct vxgedev *vdev; | 1673 | struct vxgedev *vdev; |
1674 | 1674 | ||
1675 | vdev = (struct vxgedev *)netdev_priv(dev); | 1675 | vdev = netdev_priv(dev); |
1676 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); | 1676 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); |
1677 | 1677 | ||
1678 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); | 1678 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); |
@@ -2582,7 +2582,7 @@ vxge_open(struct net_device *dev) | |||
2582 | vxge_debug_entryexit(VXGE_TRACE, | 2582 | vxge_debug_entryexit(VXGE_TRACE, |
2583 | "%s: %s:%d", dev->name, __func__, __LINE__); | 2583 | "%s: %s:%d", dev->name, __func__, __LINE__); |
2584 | 2584 | ||
2585 | vdev = (struct vxgedev *)netdev_priv(dev); | 2585 | vdev = netdev_priv(dev); |
2586 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); | 2586 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); |
2587 | function_mode = vdev->config.device_hw_info.function_mode; | 2587 | function_mode = vdev->config.device_hw_info.function_mode; |
2588 | 2588 | ||
@@ -2810,7 +2810,7 @@ static int do_vxge_close(struct net_device *dev, int do_io) | |||
2810 | vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d", | 2810 | vxge_debug_entryexit(VXGE_TRACE, "%s: %s:%d", |
2811 | dev->name, __func__, __LINE__); | 2811 | dev->name, __func__, __LINE__); |
2812 | 2812 | ||
2813 | vdev = (struct vxgedev *)netdev_priv(dev); | 2813 | vdev = netdev_priv(dev); |
2814 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); | 2814 | hldev = (struct __vxge_hw_device *)pci_get_drvdata(vdev->pdev); |
2815 | 2815 | ||
2816 | if (unlikely(!is_vxge_card_up(vdev))) | 2816 | if (unlikely(!is_vxge_card_up(vdev))) |
@@ -3139,7 +3139,7 @@ vxge_tx_watchdog(struct net_device *dev) | |||
3139 | 3139 | ||
3140 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); | 3140 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); |
3141 | 3141 | ||
3142 | vdev = (struct vxgedev *)netdev_priv(dev); | 3142 | vdev = netdev_priv(dev); |
3143 | 3143 | ||
3144 | vdev->cric_err_event = VXGE_HW_EVENT_RESET_START; | 3144 | vdev->cric_err_event = VXGE_HW_EVENT_RESET_START; |
3145 | 3145 | ||
@@ -3167,7 +3167,7 @@ vxge_vlan_rx_register(struct net_device *dev, struct vlan_group *grp) | |||
3167 | 3167 | ||
3168 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); | 3168 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); |
3169 | 3169 | ||
3170 | vdev = (struct vxgedev *)netdev_priv(dev); | 3170 | vdev = netdev_priv(dev); |
3171 | 3171 | ||
3172 | vpath = &vdev->vpaths[0]; | 3172 | vpath = &vdev->vpaths[0]; |
3173 | if ((NULL == grp) && (vpath->is_open)) { | 3173 | if ((NULL == grp) && (vpath->is_open)) { |
@@ -3216,7 +3216,7 @@ vxge_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | |||
3216 | struct vxge_vpath *vpath; | 3216 | struct vxge_vpath *vpath; |
3217 | int vp_id; | 3217 | int vp_id; |
3218 | 3218 | ||
3219 | vdev = (struct vxgedev *)netdev_priv(dev); | 3219 | vdev = netdev_priv(dev); |
3220 | 3220 | ||
3221 | /* Add these vlan to the vid table */ | 3221 | /* Add these vlan to the vid table */ |
3222 | for (vp_id = 0; vp_id < vdev->no_of_vpath; vp_id++) { | 3222 | for (vp_id = 0; vp_id < vdev->no_of_vpath; vp_id++) { |
@@ -3243,7 +3243,7 @@ vxge_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
3243 | 3243 | ||
3244 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); | 3244 | vxge_debug_entryexit(VXGE_TRACE, "%s:%d", __func__, __LINE__); |
3245 | 3245 | ||
3246 | vdev = (struct vxgedev *)netdev_priv(dev); | 3246 | vdev = netdev_priv(dev); |
3247 | 3247 | ||
3248 | vlan_group_set_device(vdev->vlgrp, vid, NULL); | 3248 | vlan_group_set_device(vdev->vlgrp, vid, NULL); |
3249 | 3249 | ||
@@ -3476,7 +3476,7 @@ vxge_callback_crit_err(struct __vxge_hw_device *hldev, | |||
3476 | enum vxge_hw_event type, u64 vp_id) | 3476 | enum vxge_hw_event type, u64 vp_id) |
3477 | { | 3477 | { |
3478 | struct net_device *dev = hldev->ndev; | 3478 | struct net_device *dev = hldev->ndev; |
3479 | struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev); | 3479 | struct vxgedev *vdev = netdev_priv(dev); |
3480 | struct vxge_vpath *vpath = NULL; | 3480 | struct vxge_vpath *vpath = NULL; |
3481 | int vpath_idx; | 3481 | int vpath_idx; |
3482 | 3482 | ||