diff options
author | Joe Perches <joe@perches.com> | 2012-04-03 08:14:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-04 20:32:14 -0400 |
commit | 044a38134a1536536cc4e542ec31a86ef8e294c9 (patch) | |
tree | f05fd823f50836290e6022cda7c7e91458ecd92f /drivers | |
parent | 01d7f30a9f962573b6c91ed520c73fb30658d826 (diff) |
vxge: Convert macro to inline function
Convert the macro to inline function to check the arguments.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/neterion/vxge/vxge-main.h | 15 |
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c index ef76725454d2..95fb61156e11 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.c +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c | |||
@@ -2860,12 +2860,12 @@ static int vxge_open(struct net_device *dev) | |||
2860 | vdev->config.rx_pause_enable); | 2860 | vdev->config.rx_pause_enable); |
2861 | 2861 | ||
2862 | if (vdev->vp_reset_timer.function == NULL) | 2862 | if (vdev->vp_reset_timer.function == NULL) |
2863 | vxge_os_timer(vdev->vp_reset_timer, | 2863 | vxge_os_timer(&vdev->vp_reset_timer, vxge_poll_vp_reset, vdev, |
2864 | vxge_poll_vp_reset, vdev, (HZ/2)); | 2864 | HZ / 2); |
2865 | 2865 | ||
2866 | /* There is no need to check for RxD leak and RxD lookup on Titan1A */ | 2866 | /* There is no need to check for RxD leak and RxD lookup on Titan1A */ |
2867 | if (vdev->titan1 && vdev->vp_lockup_timer.function == NULL) | 2867 | if (vdev->titan1 && vdev->vp_lockup_timer.function == NULL) |
2868 | vxge_os_timer(vdev->vp_lockup_timer, vxge_poll_vp_lockup, vdev, | 2868 | vxge_os_timer(&vdev->vp_lockup_timer, vxge_poll_vp_lockup, vdev, |
2869 | HZ / 2); | 2869 | HZ / 2); |
2870 | 2870 | ||
2871 | set_bit(__VXGE_STATE_CARD_UP, &vdev->state); | 2871 | set_bit(__VXGE_STATE_CARD_UP, &vdev->state); |
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.h b/drivers/net/ethernet/neterion/vxge/vxge-main.h index 372406cea25d..35f3e7552ec2 100644 --- a/drivers/net/ethernet/neterion/vxge/vxge-main.h +++ b/drivers/net/ethernet/neterion/vxge/vxge-main.h | |||
@@ -416,12 +416,15 @@ struct vxge_tx_priv { | |||
416 | static int p = val; \ | 416 | static int p = val; \ |
417 | module_param(p, int, 0) | 417 | module_param(p, int, 0) |
418 | 418 | ||
419 | #define vxge_os_timer(timer, handle, arg, exp) do { \ | 419 | static inline |
420 | init_timer(&timer); \ | 420 | void vxge_os_timer(struct timer_list *timer, void (*func)(unsigned long data), |
421 | timer.function = handle; \ | 421 | struct vxgedev *vdev, unsigned long timeout) |
422 | timer.data = (unsigned long) arg; \ | 422 | { |
423 | mod_timer(&timer, (jiffies + exp)); \ | 423 | init_timer(timer); |
424 | } while (0) | 424 | timer->function = func; |
425 | timer->data = (unsigned long)vdev; | ||
426 | mod_timer(timer, jiffies + timeout); | ||
427 | } | ||
425 | 428 | ||
426 | void vxge_initialize_ethtool_ops(struct net_device *ndev); | 429 | void vxge_initialize_ethtool_ops(struct net_device *ndev); |
427 | enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev); | 430 | enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev); |