IB/core: Don't warn on no SA support in event handler
authorMoni Shoua <monis@mellanox.com>
Wed, 10 Jun 2015 09:13:32 +0000 (12:13 +0300)
committerDoug Ledford <dledford@redhat.com>
Thu, 11 Jun 2015 03:54:34 +0000 (23:54 -0400)
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>
drivers/infiniband/core/multicast.c
drivers/infiniband/core/sa_query.c

index 605f20a9af85d9d1ad98688c5a97cbc2d303d798..1244f02a5c6d402aa5389e206b6b8e5482ec2de2 100644 (file)
@@ -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;
index 7f7c8c9fa92c70e7ab664c4d4520fe71809d96f1..3d0b7b2f5f61bcb8bcef06b644fca672650716ef 100644 (file)
@@ -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);