mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-22 04:24:02 +08:00
infiniband: Replace usnic_ib_netdev_event_to_string() with netdev_cmd_to_name()
This function just calls netdev_cmd_to_name(). Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ede2762d93
commit
3e0c2dbfea
@ -95,11 +95,6 @@ void usnic_ib_log_vf(struct usnic_ib_vf *vf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Start of netdev section */
|
/* Start of netdev section */
|
||||||
static inline const char *usnic_ib_netdev_event_to_string(unsigned long event)
|
|
||||||
{
|
|
||||||
return netdev_cmd_to_name(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void usnic_ib_qp_grp_modify_active_to_err(struct usnic_ib_dev *us_ibdev)
|
static void usnic_ib_qp_grp_modify_active_to_err(struct usnic_ib_dev *us_ibdev)
|
||||||
{
|
{
|
||||||
struct usnic_ib_ucontext *ctx;
|
struct usnic_ib_ucontext *ctx;
|
||||||
@ -172,7 +167,7 @@ static void usnic_ib_handle_usdev_event(struct usnic_ib_dev *us_ibdev,
|
|||||||
ib_dispatch_event(&ib_event);
|
ib_dispatch_event(&ib_event);
|
||||||
} else {
|
} else {
|
||||||
usnic_dbg("Ignoring %s on %s\n",
|
usnic_dbg("Ignoring %s on %s\n",
|
||||||
usnic_ib_netdev_event_to_string(event),
|
netdev_cmd_to_name(event),
|
||||||
us_ibdev->ib_dev.name);
|
us_ibdev->ib_dev.name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -209,7 +204,7 @@ static void usnic_ib_handle_usdev_event(struct usnic_ib_dev *us_ibdev,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usnic_dbg("Ignoring event %s on %s",
|
usnic_dbg("Ignoring event %s on %s",
|
||||||
usnic_ib_netdev_event_to_string(event),
|
netdev_cmd_to_name(event),
|
||||||
us_ibdev->ib_dev.name);
|
us_ibdev->ib_dev.name);
|
||||||
}
|
}
|
||||||
mutex_unlock(&us_ibdev->usdev_lock);
|
mutex_unlock(&us_ibdev->usdev_lock);
|
||||||
@ -251,7 +246,7 @@ static int usnic_ib_handle_inet_event(struct usnic_ib_dev *us_ibdev,
|
|||||||
switch (event) {
|
switch (event) {
|
||||||
case NETDEV_DOWN:
|
case NETDEV_DOWN:
|
||||||
usnic_info("%s via ip notifiers",
|
usnic_info("%s via ip notifiers",
|
||||||
usnic_ib_netdev_event_to_string(event));
|
netdev_cmd_to_name(event));
|
||||||
usnic_fwd_del_ipaddr(us_ibdev->ufdev);
|
usnic_fwd_del_ipaddr(us_ibdev->ufdev);
|
||||||
usnic_ib_qp_grp_modify_active_to_err(us_ibdev);
|
usnic_ib_qp_grp_modify_active_to_err(us_ibdev);
|
||||||
ib_event.event = IB_EVENT_GID_CHANGE;
|
ib_event.event = IB_EVENT_GID_CHANGE;
|
||||||
@ -262,7 +257,7 @@ static int usnic_ib_handle_inet_event(struct usnic_ib_dev *us_ibdev,
|
|||||||
case NETDEV_UP:
|
case NETDEV_UP:
|
||||||
usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address);
|
usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address);
|
||||||
usnic_info("%s via ip notifiers: ip %pI4",
|
usnic_info("%s via ip notifiers: ip %pI4",
|
||||||
usnic_ib_netdev_event_to_string(event),
|
netdev_cmd_to_name(event),
|
||||||
&us_ibdev->ufdev->inaddr);
|
&us_ibdev->ufdev->inaddr);
|
||||||
ib_event.event = IB_EVENT_GID_CHANGE;
|
ib_event.event = IB_EVENT_GID_CHANGE;
|
||||||
ib_event.device = &us_ibdev->ib_dev;
|
ib_event.device = &us_ibdev->ib_dev;
|
||||||
@ -271,7 +266,7 @@ static int usnic_ib_handle_inet_event(struct usnic_ib_dev *us_ibdev,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usnic_info("Ignoring event %s on %s",
|
usnic_info("Ignoring event %s on %s",
|
||||||
usnic_ib_netdev_event_to_string(event),
|
netdev_cmd_to_name(event),
|
||||||
us_ibdev->ib_dev.name);
|
us_ibdev->ib_dev.name);
|
||||||
}
|
}
|
||||||
mutex_unlock(&us_ibdev->usdev_lock);
|
mutex_unlock(&us_ibdev->usdev_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user