Skip to content

Commit

Permalink
IB/core: Don't warn on no SA support in event handler
Browse files Browse the repository at this point in the history
Registering an event handler is done for a device. This device may have
one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
Therefore, warning from the event handler about a specific port that
doesn't have SA cap is correct but pollutes the kernel log without a
need.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Moni Shoua authored and Doug Ledford committed Jun 11, 2015
1 parent db75d05 commit 9247a8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
int index;

dev = container_of(handler, struct mcast_device, event_handler);
if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
return;

index = event->element.port_num - dev->start_port;
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/core/sa_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
struct ib_sa_port *port =
&sa_dev->port[event->element.port_num - sa_dev->start_port];

if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num)))
if (!rdma_cap_ib_sa(handler->device, port->port_num))
return;

spin_lock_irqsave(&port->ah_lock, flags);
Expand Down

0 comments on commit 9247a8e

Please sign in to comment.