From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: davem@davemloft.net, Michal.Kalderon@cavium.com,
Ariel.Elior@cavium.com, dledford@redhat.com, jgg@ziepe.ca,
benve@cisco.com, 1dgoodell@cisco.com, daniel@iogearbox.net,
jakub.kicinski@netronome.com, ast@kernel.org,
edumazet@google.com, linux@rasmusvillemoes.dk,
john.fastabend@gmail.com, brouer@redhat.com, dsahern@gmail.com,
netdev@vger.kernel.org, ktkhai@virtuozzo.com
Subject: [PATCH net-next v2 2/3] infiniband: Replace usnic_ib_netdev_event_to_string() with netdev_cmd_to_name()
Date: Fri, 23 Mar 2018 19:47:29 +0300 [thread overview]
Message-ID: <152182364971.2767.11267374195546771743.stgit@localhost.localdomain> (raw)
In-Reply-To: <152182320819.2767.12723786642825837986.stgit@localhost.localdomain>
This function just calls netdev_cmd_to_name().
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
drivers/infiniband/hw/usnic/usnic_ib_main.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c
index 5bf3b20eba25..ca5638091b55 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_main.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c
@@ -95,11 +95,6 @@ void usnic_ib_log_vf(struct usnic_ib_vf *vf)
}
/* 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)
{
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);
} else {
usnic_dbg("Ignoring %s on %s\n",
- usnic_ib_netdev_event_to_string(event),
+ netdev_cmd_to_name(event),
us_ibdev->ib_dev.name);
}
break;
@@ -209,7 +204,7 @@ static void usnic_ib_handle_usdev_event(struct usnic_ib_dev *us_ibdev,
break;
default:
usnic_dbg("Ignoring event %s on %s",
- usnic_ib_netdev_event_to_string(event),
+ netdev_cmd_to_name(event),
us_ibdev->ib_dev.name);
}
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) {
case NETDEV_DOWN:
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_ib_qp_grp_modify_active_to_err(us_ibdev);
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:
usnic_fwd_add_ipaddr(us_ibdev->ufdev, ifa->ifa_address);
usnic_info("%s via ip notifiers: ip %pI4",
- usnic_ib_netdev_event_to_string(event),
+ netdev_cmd_to_name(event),
&us_ibdev->ufdev->inaddr);
ib_event.event = IB_EVENT_GID_CHANGE;
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;
default:
usnic_info("Ignoring event %s on %s",
- usnic_ib_netdev_event_to_string(event),
+ netdev_cmd_to_name(event),
us_ibdev->ib_dev.name);
}
mutex_unlock(&us_ibdev->usdev_lock);
next prev parent reply other threads:[~2018-03-23 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 16:47 [PATCH net-next v2 0/3] Drop NETDEV_UNREGISTER_FINAL (was unnamed) Kirill Tkhai
2018-03-23 16:47 ` Kirill Tkhai [this message]
2018-03-23 16:47 ` [PATCH net-next v2 3/3] net: Drop NETDEV_UNREGISTER_FINAL Kirill Tkhai
2018-03-23 16:50 ` [PATCH net-next v2 0/3] Drop NETDEV_UNREGISTER_FINAL (was unnamed) Jason Gunthorpe
2018-03-26 15:35 ` [PATCH net-next v2 0/3] Drop NETDEV_UNREGISTER_FINAL David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=152182364971.2767.11267374195546771743.stgit@localhost.localdomain \
--to=ktkhai@virtuozzo.com \
--cc=1dgoodell@cisco.com \
--cc=Ariel.Elior@cavium.com \
--cc=Michal.Kalderon@cavium.com \
--cc=ast@kernel.org \
--cc=benve@cisco.com \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=dsahern@gmail.com \
--cc=edumazet@google.com \
--cc=jakub.kicinski@netronome.com \
--cc=jgg@ziepe.ca \
--cc=john.fastabend@gmail.com \
--cc=linux@rasmusvillemoes.dk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox