mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
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>
This commit is contained in:
parent
01d7f30a9f
commit
044a38134a
@ -2860,12 +2860,12 @@ static int vxge_open(struct net_device *dev)
|
|||||||
vdev->config.rx_pause_enable);
|
vdev->config.rx_pause_enable);
|
||||||
|
|
||||||
if (vdev->vp_reset_timer.function == NULL)
|
if (vdev->vp_reset_timer.function == NULL)
|
||||||
vxge_os_timer(vdev->vp_reset_timer,
|
vxge_os_timer(&vdev->vp_reset_timer, vxge_poll_vp_reset, vdev,
|
||||||
vxge_poll_vp_reset, vdev, (HZ/2));
|
HZ / 2);
|
||||||
|
|
||||||
/* There is no need to check for RxD leak and RxD lookup on Titan1A */
|
/* There is no need to check for RxD leak and RxD lookup on Titan1A */
|
||||||
if (vdev->titan1 && vdev->vp_lockup_timer.function == NULL)
|
if (vdev->titan1 && vdev->vp_lockup_timer.function == NULL)
|
||||||
vxge_os_timer(vdev->vp_lockup_timer, vxge_poll_vp_lockup, vdev,
|
vxge_os_timer(&vdev->vp_lockup_timer, vxge_poll_vp_lockup, vdev,
|
||||||
HZ / 2);
|
HZ / 2);
|
||||||
|
|
||||||
set_bit(__VXGE_STATE_CARD_UP, &vdev->state);
|
set_bit(__VXGE_STATE_CARD_UP, &vdev->state);
|
||||||
|
@ -416,12 +416,15 @@ struct vxge_tx_priv {
|
|||||||
static int p = val; \
|
static int p = val; \
|
||||||
module_param(p, int, 0)
|
module_param(p, int, 0)
|
||||||
|
|
||||||
#define vxge_os_timer(timer, handle, arg, exp) do { \
|
static inline
|
||||||
init_timer(&timer); \
|
void vxge_os_timer(struct timer_list *timer, void (*func)(unsigned long data),
|
||||||
timer.function = handle; \
|
struct vxgedev *vdev, unsigned long timeout)
|
||||||
timer.data = (unsigned long) arg; \
|
{
|
||||||
mod_timer(&timer, (jiffies + exp)); \
|
init_timer(timer);
|
||||||
} while (0)
|
timer->function = func;
|
||||||
|
timer->data = (unsigned long)vdev;
|
||||||
|
mod_timer(timer, jiffies + timeout);
|
||||||
|
}
|
||||||
|
|
||||||
void vxge_initialize_ethtool_ops(struct net_device *ndev);
|
void vxge_initialize_ethtool_ops(struct net_device *ndev);
|
||||||
enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
|
enum vxge_hw_status vxge_reset_all_vpaths(struct vxgedev *vdev);
|
||||||
|
Loading…
Reference in New Issue
Block a user